we tried this way to send multiple values to different dashboards, but the ELSE part in the program is not working.
What can be done for that purpose and if any other ways are there to do so,
help is appreciated
import serial
from ubidots import ApiClient
print("Program Started")
api = ApiClient(token ='A1E-dnrYvUK0A1e65ZJXS7SvJLOWvZzKet')
my_temp = api.get_variable('5a784be2c03f9727382ea6be')
rpm=api.get_variable('5a784bcbc03f9727192e4cfa')
while True:
for i in range(2):
if(i==0):i=i+1
ser = serial.Serial('/dev/ttyACM0', 9600) #update with port for Arduino
read_serial = ser.readline()
tempReading =long(read_serial)
new_value = my_temp.save_value({'value': tempReading})
print(new_value)
else:ser = serial.Serial('/dev/ttyACM0', 9600) #update with port for Arduino
read_serial = ser.readline()
tempReading =long(read_serial)
new_value = rpm.save_value({'value': tempReading})
print(tempReading)