- 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
5 odpowiedzi
+ 3
VISHNU MALLAMPALLI You are asking question and sharing others code. Why?
+ 1
I have made a test python library with C/C++ using boost.python.
It took a lot of effort to do.
+ 1
Hi VISHNU MALLAMPALLI
Here is the links I managed to make it with.
I hope you are good with both C/C++ and Python.
https://www.boost.org/doc/libs/1_71_0/libs/python/doc/html/tutorial/tutorial/hello.html
https://youtu.be/9q-LHP7cMfg
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)
{
0
Can u do this