SerialRead() in my python script

I’m using arduino uno and Boltiot module for serial communication in my project. Two sensors are integrated on arduino, whose values are read using timer interrupts (separate ISR function is made). Now, i want to read values from both sensors using python (obv bolt-python lib is imported), should i do serialRead() for both analog sensors? Also, does serialRead() send every print statement in arduino code over the cloud?

Hi @divnoorsingh675,
Yes you can use serialRead()

If you have connected your bolt and Arduino using UART using hardware serial port, then whatever you print on the Serial port will be captured by the Bolt using serialRead(). Make sure the message is not too long as the Serial buffer is limited in size and may cause problems. Do let me know if you need any other help.

Thankyou @raghav.srivastava for your reply.
Now another issue arises. I’m just printing 4 lines on the serial port, yet after taking reading from sensor couple of times, my api-limit is reached, thus gets blocked for another 5-6 hrs. How to avoid this? ;(

One more query: In my project 2 arduinos are being used with one boltiot wifi module for different events. Boltiot module has to be communicating serially with both, but it can communicate with one arduino at a time, so i’have to disconnect it from one arduino ckt & deply with another arduino.
My project has to be in single flow, what you recommend in this case? Can i write somewhere ‘if/else’ statements to select uno board?

@divnoorsingh675

To solve the above issue, use delay commands of at least 1 min - 5 mins. Having a Bolt Cloud Pro subscription removes this issue of hitting API limit frequently.

You can use the software serial (UART) or master-slave (SPI) communication to send and receive data to-and-fro with the other Arduino Devices, while it sends UART signals to-and-fro with the Bolt device.

I’d suggest you to keep the main Arduino to work on the process of receiving information from the Bolt module and process it there itself while sending the signal for a different event to the other one.

However, the whole idea of using another Arduino board for a different event does not look efficient, since you can make one Arduino do the JOB of performing multiple events.