- 1

How to convert c++ coding into python coding

To convert the given code into python code, the given code is in c++ language https://code.sololearn.com/W0xoIj7xy1My/?ref=app https://www.sololearn.com/discuss/2034774/?ref=app

14th Oct 2019, 5:53 AM
VISHNU MALLAMPALLI
VISHNU MALLAMPALLI - avatar
5 Réponses
+ 3
VISHNU MALLAMPALLI You are asking question and sharing others code. Why?
14th Oct 2019, 7:04 AM
A͢J
A͢J - avatar
+ 1
I have made a test python library with C/C++ using boost.python. It took a lot of effort to do.
14th Oct 2019, 6:08 AM
Manual
Manual - avatar
+ 1
14th Oct 2019, 6:12 AM
Manual
Manual - avatar
0
#include <SoftwareSerial.h> #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int lightPin = 13; int flamePin = A5; int buzzer = 6; int relay = 7; int tempsensor=A0; SoftwareSerial mySerial(9, 10); void setup() { pinMode (lightPin, OUTPUT) ;// define LED as output interface pinMode (A5, INPUT) ;// Intput interface is defined pinMode (relay, OUTPUT); pinMode (tempsensor, INPUT); pinMode (buzzer, OUTPUT) ;// output interface is defined lcd.begin(16, 2); lcd.setCursor(0, 0); lcd.print("Fire-Temp Alarm"); delay(1000); Serial.begin(9600); mySerial.begin(9600); // Setting the baud rate of GSM Module Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino) delay(100); } void SendMessage() { while(1){ int analogValue = analogRead(flamePin); int analogValue1 = analogRead(tempsensor); int sensorValue=analogRead(A0); double V=sensorValue; double l= (V/1023)*500; int Temp=l; if (analogValue<500 || Temp> 40) {
14th Oct 2019, 5:53 AM
VISHNU MALLAMPALLI
VISHNU MALLAMPALLI - avatar
0
Can u do this
14th Oct 2019, 6:10 AM
VISHNU MALLAMPALLI
VISHNU MALLAMPALLI - avatar