Sep-25-2017, 07:55 AM
(This post was last modified: Sep-25-2017, 07:55 AM by codingKnight.)
Good day everyone,
I'm trying to rewrite some existing Arduino code to python. Basically the arduino just receives an http post request then parses the request and sends it as a text message. Then when it receives a text message it sends it to a server where all it's text messages are stored.
void loop()
{
if(serial.available())
{
//check for new sms
}
if(server.available())
{
//send sms code
}
}
I can do it with sample code above. But I want to rewrite it in python. While the HTTP server is idle it should be checking for incoming sms. But when I turn on the http server I can't do anything else other than send sms based on the post request received.
I'm using sim800l to send a text message and http.server library to handle http requests.
I'm trying to rewrite some existing Arduino code to python. Basically the arduino just receives an http post request then parses the request and sends it as a text message. Then when it receives a text message it sends it to a server where all it's text messages are stored.
void loop()
{
if(serial.available())
{
//check for new sms
}
if(server.available())
{
//send sms code
}
}
I can do it with sample code above. But I want to rewrite it in python. While the HTTP server is idle it should be checking for incoming sms. But when I turn on the http server I can't do anything else other than send sms based on the post request received.
I'm using sim800l to send a text message and http.server library to handle http requests.