Doubt regarding fetching data from sensors

Fellow Community Members,
I am making a project where GPS sensor is connected to Arduino and Arduino is connected to bolt through which i am reading sensor data. So as per bolt training, its simple to just read and send data to cloud or VMware where the data is processed. But what if I want to read data from main script and pass the readings to another script as input in a time consistent manner?

If I had been doing this project with just Arduino then it would be simple to just serially read data but in this scenario it becomes somewhat confusing. And just some information for the sake of this question that I am have treated my own system as cloud and operating everything from terminal so I am able to develop gui based applications .Any kind of guidance is appreciated.

Can you elaborate on the working principle of your project?

You want to use GPS sensor with Arduino and push the data to your cloud terminal. Am I right?

If in case, you have any progress with the code, can you share it?

At present it’s just a concept which can be further develop if I can get these answers. So you are correct that I want to read gps sensor data connected to arduino which is connected to bolt. When I developed it using arduino I used python library to read data serially from com port of arduino and that readings were provided to different script. So for this problem one solution I thought of is to run the main script and save the data in some file and read it from file in another script. But the problem is that the scenario is time restricted and this approach will make the process slow.

Using python script to read from COM port of Arduino? I am unclear. Can you share any script or github repo? Or any image of the project?

Which GPS module are you using?

Something like this - https://create.arduino.cc/projecthub/smart-tech/amazing-control-computer-using-hand-motion-and-arduino-d933f1

You can suggest how it can be implemented using bolt? Or how the commands can be fetched and be provided to another script?

I got the project, it has used pyserial to use read Ultrasonic sensor data to control PLAY and PAUSE.

Tell us about the project you are trying to build. Then I might be able to help you on where to start from.

1 Like

Same one with moderate changes. But if you can help then first you shall guide me that how the exact same thing can be implemented using bolt. In my case its has more chances of happening because I am using my terminal instead of cloud so i can control gui applications using this where cloud will only have command line service.

Okay, you want to control another PC’s functions using bolt through your PC, right?

Control my pc’s functions using ultrasonic sensor connected to bolt and arduino.

What is Bolt supposed to do here? That’s what I am asking. What is the working principle of the idea you have? What exactly do you wish to do?

1 Like

The exact one I showed you. Actually I did this as my mini project in college. So I just wanted to try to implement it using bolt, like controlling multimedia environment using arduino and bolt. And was gonna apply for certification exam too but for project to pass the review bolt hardware should be used thats becoming a problem. Thats why I needed help.

Basically you want to make a portable gesture controller, right? Have the project work like a portable controller, so that you control your PC functions no matter how far you are. And your project wires need not be connected to the PC. Is that correct?

Open to both wired and wireless approaches.

Okay. If you have worked with serial communication before, this explanation will strike your mind for sure, and you should be able to build the project in a day.

First, write an arduino program, with software serial connected to bolt (say pin 8, 9 as mySerial). Use the software serial to send data to the Bolt module. Like ‘PL’ for Play, ‘PAU’ for Pause, ‘SPACE’ for spacebar, etc.

Then, write on the serial monitor ‘PLAY initiated’, ‘PAUSE intitiated’ etc.

Above serials should be triggered based on your Ultrasonic sensor inputs, whatever conditions you provide.

That’s all for Arduino and Bolt.


Right now, whatever your arduino runs, will be visible on the cloud, if you initiate Serial begin API and then run serialRead API.

So, this serialRead API has to be called every second or whenever your arduino loops to mySerial.print (software serial). As the PL, PAU, SPACE willbe on the cloud now, you can read this data however you wish.

Write the python script with pythogui to perform PLAY, whenever serialRead of the particular device ID and API returns ‘PL’ string.

Similarly, once the python script is ready, run the python script on the laptop first, then turn on your bolt+arduino.

I hope this explains how your idea can be put into function.

1 Like

Thanks for your guidance. I shall get back to you once I have implemented it practically so if anything comes then it can be solved in one go.

Suggestion - Have an LCD, to check if the function trigger is working. Will help you later to troubleshoot.

1 Like