How to send data from Arduino to Raspberry pi using ESP8266 Module - webserver

I need to send sensors (MPU9250) data from arduino to the Raspberry Pi 3, I'm thinking about using the ESP8266 Module in Arduino, but i can't find any help on how I will do this.
I'm thinking about creating a local web server using the ESP8266 and retrieve the data using a python script in the Raspberry Pi, but I am having trouble with the script for retrieve data from the server that is in another host.

you could create a simple rest api by adapting this tutorial for your usecase. then use the python requests libary on the raspberry pi to poll the ardunio every x secconds

Related

How to send data between two already configured HC-05 modules pi pico

I'm building an small project in which I'd like to send information from a master HC-05 bluetooth module to an slave one (both of them connected to different pi pico's), I've already synced them following Bluetooth HC-05 master-slave configuration using CircuitPython tutorial, I've finished the set up and now both modules (master and slave) seem to be properly connected, now the problem is that I don't know how to send data from one to the other.
All the tutorials that I've found that imply bluetooth communication seem to do it from a mobile Android app to the slave module, but what I'd like to do is to read data from an analog joystick with one pi pico and send it to through my master HC-05 the slave module (which would be connected to another pico) and then control an electric motor with this received data.
As I understand, the configuration process was finished in CircuitPython but this DOES NOT obligate me to continue with CircuitPython, I mean, I could do my implementation with microPython for example as Circuit Python was used only for the configuration process, is this correct?
My main question is, what is the library/process I could use to send data from master module to slave module?
Pd: I know there is a Raspberry Stack Exchange site but I posted my question here for visibility and also it is related to software too!.

Ideas to communciate with a BMS and a PLC on RPI using RS 485

I am currently working on a project that involves communication between a PLC , Raspberry Pi 4 and a BMS (Battery Management System) system on a battery.All three device use RS485 for communication using minimalmodbus via python on the RPI.
The Raspberry pi has a generic CAN/RS485 HAT (similar to this : https://www.waveshare.com/rs485-can-hat.htm)
Currently I am able to communicate with the PLC to receive and send data from the RPI with the PLC as a master and the RPI as a slave.
As per my understanding , in order to read data from the BMS using the Pi, the RPI has to be a master. But in this case, as the RPI is a slave to the PLC, and the PLC cannot be used to read data from the BMS.
I would like to know if it is possible for the RPI to function as a Master to the BMS when being a Slave to the PLC at the same time ?
Assuming that it is possible able to connect another RS 485 HAT to the same RPI and run separate scripts for each HAT.

How to use window as a Raspberry Pi

ı'm working on a project which is about two raspberry pies' communication.I created a server and a client,ı want one raspberry pi to be server to send a input and another raspberry pi to be client to take the output but ı don't have second raspberry pi,How can ı use windows/my laptop as second raspberry pi. Could you please help me about that?
What language are you using?
How are you two terminals supposed to communicate?
You need to make your question more clear.
If your server and your client are supposed to communicate over HTTP, you don't need to have two raspis; as long as your app can get your app to run on a machine, you can use it as a server/client

What driver should I use for connecting Osisoft Pi with my C# Client

I have an C# application that uses OPC UA to communicate. Now I need to communicate with an Osisoft Pi system, which as I understand it also "is" an OPC UA Client. There is no PLC involved!
My client and the Osisoft Pi is running on different computers in the LAN.
The OPC UA Server (KepServerEx 6) needs a driver configured.
What driver would be appropriate for this scenario?
You would need an OSIsoft UA Interface licence to communicate with it using OPC UA.
OSIsoft PI is a historian run on a server i would suspect your client is scared of licencing costs. There are ways and means, you can insert the data into AF and still have it visible to the PI systems, however it is limited and the better way to do it is to implement the correct OSIsoft interface or protocol.
As mentioned above AF-SDK is the way to go for C#, however be aware you will need an PSA licence on the server to run it.
If you are using C#, the most native way to connect to the PI System is by using PI AF SDK. This sdk will allow you to connect to both the PI Data Archive as well as PI Asset Framework Server.
The first server (PI DA) contains the process data collected via PI Interfaces or PI Connectors (typically OPC, Modbus, flat files etc). PI AF (Asset Framework) is a server that allows to create all the assets hierarchies of a plant and map asset attributes to the process data collected in PI DA.
Perhaps, you should look at PI System interfaces or connectors to collect the data first, and then use the data stored in the PI System to build your application. This is the standard usage of the PI System who helps reducing different vendors silos of process data.
To get a quick start on the multiple ways to use the PI System as a developer have a look here: OSIsoft PI Developer Technologies
And to get started with the PI System, and understand what it is about, you should look here: What is the PI System?

How to Stream data over TCP to a Windows 7 laptop?

Im acquiring data from a sensor using RaspberryPi. Now the idea is to get the data streaming over an ethernet link to my Windows 7 laptop and do the monitoring and recording on the laptop. Can I get some advice on how to implement this in C/C++.
The idea is to get the signal from a sensor streamed to a Windows GUI.
You can push data from your raspberry PI to you Windows
You can have some sort of service on your Windows box and your raspberry PI can push information to your software running on your Windows.
or
you can pull data from your raspberry PI to you Windows
In this case, raspberry PI would be a passive provider and Windows would ask for data.
Hard to give you more information without more details but basically you decide who is going to the passive and active and program that way.
I personally would request data from the raspberry PI to Windows as I can have my service running and just update when I need instead of having my service running and suddenly have my data changing.
That said, it's hard to say without more details.
You need to tell what kind of programming language are you going to use.
According to your question, you need to dig into socket programming.
Recently,I linked my two Raspberry-Pi by writing a python script to establish a TCP connection between them.
and there is this protocol called "RTSP(Real Time Streaming Protocol)" to (as the name says) stream data in real-time.
(If you are to use python , there is this module called gst-python for streaming).
I think the above infos would give you where to start.