when I take more then one data from arduino digital or analog pin ,then how can i written python programme for each of arduino analog and digital pin data.
You want to control Arduino with Python? Arduino IDE is a C/C++ based environment to program Arduino.
If that’s your case, then refer here - https://pythonforundergradengineers.com/python-arduino-LED.html
Hi @sorif9933,
Can you share your current code with us and what exactly are trying to do ? Also check this thread Project using Arduino
Do let me know in case you need any other information.
sir
I want to connect one DHT11 sensor to Arduino Uno and I want to get the temperature and humidity graph in bolt cloud. And also with this I want connect 4 LDR sensor at the analog pin of Arduino Uno and I also connect some sensor and LED in bolt WIFI module.
Sir I want access each of LDR data by written a python code in VM work station on UBUNTU server.
Hi @sorif9933,
Check this project https://www.boltiot.com/projects/humidity-and-temperature-monitoring-system. In the above project, we have connected the DHT11 sensor and doing serial write using this command https://github.com/Inventrom/boltiot-arduino-helper
You can pass many sensor data using comma-separated values.
For example:
Suppose the value of sensor A is 10 and the value of sensor B is 20
You can write “10, 20” to the serialWrite.
While doing the serialRead,
You can do (python code)
response = bolt.serialRead(10) // You are reading first 10 charters of incoming uart data.
// the value of response will be
// {"success": "1", "value": "10, 20"}
//Now we need only the value from the response,
data = json.loads(response)
data_value = data["value"]
// Here data_value is "10, 20"
Now we know each sensor value is separated by a comma.
data_value = data_value.split(',')
// ['10', ' 20']
sensor_A = data_value[0]
//10
sensor_B = data_value[1]
//20
Now you have both the sensor value in different variables.
I am also inviting @shafiq.shaikh to help you out with this query.
Do let me know in case you need any other information.