I have a raspberry Pi and I wanted to read data from my RFID Reader that produced output to TCP connection. How do I read the data using Node-red?
Thanks
Related
At a high-level, I am trying to convert serial data coming off of an RS-232 cable so that an I2C device can read it. I am not married to any one component or solution but the transmitting device, a voltage controller, will only send via serial, and the receiving device I want to use only supports I2C.
More specifically:
I am using this PC meterbus adapter to get data off of a voltage controller, and the output format it supports is RS-232. I have an IoT device that uses a Feather S2 board as its control unit, and I basically want to send the data coming off of the voltage controller to the cloud using that device. It only supports I2C via a little header that the feather S2 plugs directly into.
So, to recap, we have an RS-232 cable plugging into this Mikroe device. The device connects to a Feather S2 board using the SDA and SCL pins. The problem I'm having now is that when I run a sketch to detect connected I2c devices:
import time
import board
i2c = board.I2C()
while not i2c.try_lock():
pass
try:
while True:
print(
"I2C addresses found:",
[hex(device_address) for device_address in i2c.scan()],
)
time.sleep(2)
finally:
i2c.unlock()
It's returning:
I2C addresses found: []
I can't get any useable data from my voltage controller if I can't even get the board to detect the serial to I2C converter.
I've ruled out bad soldering, no pullups, etc. I'm thinking maybe this device isn't appropriate for this use-case and I need something else, or, having read the datasheet, maybe I need to send some sort of start condition from the feather to the I2C click to get it to start transmitting.
If that's the case, I'm at a loss, because I've never interfaced with an I2C device NOT using a circuitpython library for that device. I tried looking at Mikroe documentation, but it seems like that community doesn't support Python. Does anyone have any suggestions about where to begin? Either a different module to use for my serial-to-I2C conversion, or some python approach to coax the Mikeroe module into playing nice with my Feather S2.
Thank you for reading my question! I appreciate any and all help!
I am trying to connect a WiFi module (ESP8266) to a "funduino" development board (Arduino Nano) but I have no success. Since I tried so much schematics I've found on the internet about the connection between them two, I kindly ask here if is anyone who succeed in "pairing" this two devices.
I am asking for the schematic and a functional source code.
Regards
The ESP-01 by default comes with nonOS SDK bootloader that communicated via AT commands, you can find the complete command set from Expressif here. This is designed for an MCU (like Arduino Nano) to use it purely as an WiFi module rather than using it as a stand-alone MCU (for which it will require NodeMCU SDK).
If you ever upload an Arduino sketch up to the ESP-01, it will erase the AT Command firmware.
Assuming your ESP-01 is still having the AT Command firmware. What #Ben provided is a sketch that allows you to type AT commands via the Serial Monitor to internact with the ESP-01, it is manual, and good for testing if ESP-01 is working (you type AT and press return on Serial Monitor, the ESP-01 will ack with Ok) but not practical as a real application. The minimum commands required to established an WiFi connection with ESP-01 is listed below.
AT+CIPMUX=1 - Enable single (0) or multiple connection (1) to the web server.
Multiple connection is a good option if you are repeatedly sending
out or reading data from the Internet.
AT+CWMODE=3 - Set WiFi mode: 1 is station mode (ESP8266 is client), 2 is AP mode
(ESP8266 acts like a WiFi router where your phone or PC can connect),
3 is AP+station mode (make the ESP8266 do both)
AT+CWJAP=“<your-ssid>”,”<your-pw>” - Connect to your WiFi. Provide your SSID name
and password inside the double qoutes.
AT+CIFSR - This returns the IP address of the module, indicating that it has
successfully connected to your WiFi router.
Once the WiFi connection is established, you can further communicate with the ESP-01 via the connection, like accessing a website for example:
AT+CIPSTART=0,"TCP", "www.example.com","80” - Start TCP or UDP connection. The
0 is the id of the connection.
AT+CIPSEND=0,16 - Command to tell the module data is ready to be sent. 0 is the
connection id, and 16 is the length of the data to be sent.
After this command, the ESP8266 will reply with the “>”
character to tell us that it will be waiting for the data to be
sent. If successful, the module will reply with “SEND OK”
GET / HTTP/1.1 - Send the http header, and other data, etc...
You can write your own sketch to automate those AT commands for interacting with with ESP-01 once you understand the AT commands required for establish a WiFi connection.
Here are two resources that I personally found extremely useful for doing more than connecting to WiFi.
STM32-ESP-01 Web Server - although this is for interfacing with STM32, the main difference is the pin assignment, so you should be able to port to Arduino easily.
MQTT via ESP-01
As for hardware interface, please noted that what #Ben provided is correct in principle, but you need to be aware that the ESP-01(ESP8266 to be precise) is a 3V3 MCU, so the connection is depended on what kind of host board you are using. If you are using Arduino Uno/Nano, both are having a 5V MCU, you will need a voltage divider (two resistors to drop the voltage to 3v3 before connecting to ESP-01) or a level shifter chip at least for the ESP-01 Rx pin to avoid the potential damage to the ESP-01.
how to send temperature readings from nodemcu to raspberrypi wirelessly and store it in a database. Can somebody provide me with a tutorial. Thanks
You need to use MQTT protocol to send data to raspberry pi from nodemcu. On raspberry pi python script will subscribe to mqtt topic where data is received and can be stored into database.
I am attempting to send some data from Processing to my Arduino over the serial connection so that the Arduino can control an LED strip. Could I view the serial monitor while this transfer was taking place?
It is irking me that I cannot use any Serial.println statements (for debugging) while Processing is communicating with the Arduino. Everytime I try I get
Serial port 'COM3' already in use. Try quitting any programs that may be using it.
Is there a way for this serial communication to take place while I view the serial monitor at the same time?
The fact that the error message mentions COM3 suggests you are running on Windows. Unfortunately Windows doesn't allow multiple processes to simultaneously connect to the same serial port. This is different from Unix-based systems which do allow simultaneous serial port connections.
Using a Linux host, I have used a Python script send commands whilst monitoring results on the serial monitor. I seem to recall I had to open the serial monitor first and then run the other program.
Unfortunately, I can't help you with how to achieve that in Processing.
There is an application called Portmon that will allow you to monitor the serial communications on your PC.
Try 2 Serial communication,
Imagine you have already given USB as COM3 have a bluetooth device connected to your arduino Tx & Rx port, Let that be COM8. Now view COM3 in Arduino and COM8 in Processing.I could do this.
What is a way to read some data from the USB device TelosB Mote?
It sends packets of 12 octest, and all I want to do is to read two of them. I want to be able to set the transfer speed and the data buffer - I guess.
This board has an integrated USB device port. I've read about the USB shield 2 library, but I've seen it helps connecting it with an Android phone.
How can I fix this problem?