bestecf
Posts: 5
Joined: Tue Feb 05, 2019 6:32 am

Running program on RPi

Wed Feb 06, 2019 1:26 pm

I’m interested in a project which is measuring distance.

On my project, I use ultrasonic sensor and NodeMCU ESP8266. I wrote a code on Arduino to start and receive data of sensor. Arduino code send Trigger signal to start sensor, then it generate Echo signal whose length give us sound waves' travel duration.

I want to embed all of them to Raspberry Pi 3 to show LCD Screen, like a mobile phone.
Last edited by bestecf on Thu Mar 07, 2019 2:37 pm, edited 2 times in total.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Running program on Raspberry Pi 3

Wed Feb 06, 2019 7:48 pm

Personally I would simplify the whole thing by driving the ultrasonic sensor directly from the Pi.

I have no idea why you need Labview in there. Just measure the the echo time, do the calcs and display on LCD.
Memory in C++ is a leaky abstraction .

pcmanbob
Posts: 9462
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Running program on Raspberry Pi 3

Wed Feb 06, 2019 8:08 pm

We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

bestecf
Posts: 5
Joined: Tue Feb 05, 2019 6:32 am

Re: Running program on Raspberry Pi 3

Thu Feb 07, 2019 6:21 am

Heater wrote:
Wed Feb 06, 2019 7:48 pm
Personally I would simplify the whole thing by driving the ultrasonic sensor directly from the Pi.

I have no idea why you need Labview in there. Just measure the the echo time, do the calcs and display on LCD.
I want to use Raspberry Pi 3 to embed it displaying distance measurement like GUI.
Last edited by bestecf on Thu Mar 07, 2019 2:36 pm, edited 1 time in total.

bestecf
Posts: 5
Joined: Tue Feb 05, 2019 6:32 am

Re: Running program on Raspberry Pi 3

Thu Feb 07, 2019 6:40 am


Thanks for websites. However, that is not what I want to say. Above the reply, I tried to tell again. You may check it if you want to understand more clear.

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: Running program on Raspberry Pi 3

Thu Feb 07, 2019 11:28 am

You could use MQTT, for example. A very common way to use remote sensors on things like ESP8266 is this. You install an MQTT broker on the RPi which collects data from sensors which send then over the network. The Rpi then collects that data, stores it and allows people to view and plot it in different ways (or do whatever they intend to do). It can be displayed on a locally connected LCD, send to some cloud platform, or served by a webserver to any device. Benefits include that the mqtt protocol was desibned for this puirpose, that there are ready libraries for ESP8266, you can easily add more sensors, free open source software exists, and millions of tutorials on the net.

here is quote from the link below
MQTT was designed to save as much as possible the battery of the mobile devices on which it is used. It is 11 times less energy consuming to send messages and 170 times less to receive than HTTP. MQTT is also 93 times faster than HTTP.


https://en.wikipedia.org/wiki/MQTT

https://diyprojects.io/mqtt-mosquitto-c ... FwW61wzYuU

Return to “General discussion”