@mfalkvidd Ah thanks ! Also when you mean power it with 3.3V do you mean just the nrf module or the entire Pro mini board ?
Posts made by LaMB95
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
@mfalkvidd I m sorry but Whats flashing a sketch ?
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
@mfalkvidd
Well, I do believe that is the underlying issue here. But the NRF modules can't handle VCC more than 3.3V so I took a 3.3V connection from my breakout board (CP2012) and supplied to the NRF module (Vcc pin only).
Could this be causing the issue? -
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
@gohan Well I was gonna use the received text to test the communication itself. The whole point I got a pro mini was to connect it as a serial gateway to the RPi3 and see it on Domoticz as we discussed earlier.
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
@gohan
Code in Pro Mini:#include <HardwareSerial.h> #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> RF24 radio(9, 10); const byte rxAddr[6] = "00001"; void setup() { while (!Serial); Serial.begin(9600); radio.begin(); radio.openReadingPipe(1, rxAddr); radio.startListening(); } void loop() { if (radio.available()) { char text[32] = {0}; radio.read(&text, sizeof(text)); Serial.println(text); } }
Code in Uno:
#include <SPI.h> #include <nRF24L01.h> #include <RF24.h> RF24 radio(9, 10); const byte rxAddr[6] = "00001"; void setup(void) { radio.begin(); //Serial.println(F("*** PRESS 'T' to begin transmitting to the other node")); radio.setRetries(15, 15); radio.openWritingPipe(rxAddr); radio.stopListening(); } void loop(void) { const char text[] = "Hello World"; radio.write(&text, sizeof(text)); delay(1500); }
I have set the processor to 3.3V 8MHz.
I have connected the Pro mini to the computer via a CP2102 breakout board. -
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
I am facing an issue while sending data from an Arduino pro mini 5V to an arduino UNO. Receiving a lot of garbage from the Pro mini.
Any idea why ? -
RE: 💬 Connecting the Radio
It worked yesterday now I am back to the same problem.
What a wonder ! -
RE: 💬 Connecting the Radio
@mfalkvidd Haha not really a 3.3 output I changed its input voltge to 3.3 hoping it would work.
But nevertheless I managed to solve the issue.
It seems to be an error in the Hardware serial.Refer: http://forum.arduino.cc/index.php?topic=46458.0
The code bhagman has posted worked !
-
RE: 💬 Connecting the Radio
I have an arduino pro mini 5V. But I have attached a breakout CP2102 usb connection to it. On the board there is a 3.3V point which I have plugged in as Vcc to the NRF24L01+ module.
To upload the code I have selected the 5V 16Mhz as processor.
-
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
@gohan
Thanks for the code!I have been trying to send data from an Uno to a pro mini. Unfortunately, I have been receiving symbols and gibberish on the mini as it has be assigned as a receiver.
Any clue why?
I was hoping to send the collected data from the pro mini to the RPi3 via serial gateway and then to Domoticz. -
RE: 💬 Connecting the Radio
I m getting symbols when I send Hello World message from Arduino Uno to an Arduino Pro Mini (5V).
Yes I have put an input of 3.3V to the pro mini.
Baud rate used is 9600.
Any clue why this is happening? I can provide the code. -
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
SO what changes did you make to the gateway arduino in order to recieve the data from a sensor node?
-
RE: 💬 Selecting a Gateway
I am confused.
If I am sending data from an Arduino to a RPi3 using NRF24L01+.
Won't the Arduino be a sensor node?
If so, does that make the rpi3 the recieving node which is also acting like a gateway to a controller (OpenHab)?Does anyone know how to set up the raspberry to collect this sensor data?
Or do I have to add an arduino to it for collecting this data? -
RE: 💬 Building an Ethernet Gateway
Anyone have an instruction to set up a W5500 ethernet gateway?
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
Okay could you check what version of Arduino IDE you have now ?
If there is a newer version upgrade to that.My issue was that I could not find the library manager in the version I had.
Hope it helps !
-
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
Well considering how difficult it seems at times I think I will stick to it for now.
Could you point me towards the tutorial you used for your project?
I might try to create something for the time being with your help!Thanks !
-
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
I checked the page!
It was quite helpful and I realise that a serial gateway is not something that I need.I need some help to understand the working of a virtual serial port.
-
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
What I am trying to do is to put the arduino in my garage and send this data to something like OpenHab or Wordpress such that I can see the parking status from another location.
And a couple of youtube tutorials I saw were able to send the data from an arduino to a pi (without any USB cable) using this radio.
I was hoping such a method is possible using the MySensors library.Another question I have is what aout using a virtual serial port ? But I think I would need an ethernet shield on the arduino. Am I right?
-
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
So what gateway would be chosen if the data is sent from the Arduino to the rpi3 using these modules?
I mean I saw a youtube tutorial to send it directly from an arduino to the rpi3 and I figured the same would be possible using a my sensors library and instruction.I don't wish to add an Arduino to the rpi3 just for data collection.
Any suggestions? -
RE: Sending data from Arduino to Raspberry Pi via NRF24L01+
@gohan
Using Arduino with Serial Gateway sketch using NRF24L01+ to a Rpi3 -
Sending data from Arduino to Raspberry Pi via NRF24L01+
I am trying to send some ultrasonic data from an arduino uno to RPI3.
My Arduino Code is:// Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 // Set LOW transmit power level as default, if you have an amplified NRF-module and // power your radio separately with a good regulator you can turn up PA level. #define MY_RF24_PA_LEVEL RF24_PA_LOW // Enable serial gateway #define MY_GATEWAY_SERIAL // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender) #if F_CPU == 8000000L #define MY_BAUD_RATE 38400 #endif // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 #define PARK_OFF_TIMEOUT 20000 // Number of milliseconds until turning off light when parked. #include <MySensors.h> #define SEND_STATUS_TO_CONTROLLER // Put a comment on this line for standalone mode //#include <NewPing.h> #ifdef SEND_STATUS_TO_CONTROLLER // Enable debug prints to serial monitor #define MY_DEBUG #include <SPI.h> #include <MySensors.h> #endif #ifdef SEND_STATUS_TO_CONTROLLER #define CHILD_ID 1 MyMessage msg(CHILD_ID,V_TRIPPED); #endif unsigned long sendInterval = 5000; // Send park status at maximum every 5 second. unsigned long lastSend; int oldParkedStatus=-1; #define echo_Pin 6 // Echo Pin #define trig_Pin 5 // Trigger Pin int blueledPin = 3; // the pin the LED is attached to (use one capable of PWM) int greenledPin = 7; int redledPin = 2; int a = 850; long duration, value; void setup() { // initialize serial communication: Serial.begin(115200); Serial.println("Starting distance sensor"); pinMode(greenledPin, OUTPUT); pinMode(redledPin, OUTPUT); } #ifdef SEND_STATUS_TO_CONTROLLER void presentation() { sendSketchInfo("Parking Sensor", "1.0"); present(CHILD_ID, S_DOOR, "Parking Status"); } #endif void loop() { //and the distance result in centimeters: pinMode(trig_Pin, OUTPUT); digitalWrite(trig_Pin, LOW); // Give a short LOW pulse beforehand to ensure a clean HIGH pulse: delayMicroseconds(10); digitalWrite(trig_Pin, HIGH); // The sensor is triggered by a HIGH pulse of 10 or more microseconds. delayMicroseconds(5); digitalWrite(trig_Pin, LOW); // Read the signal from the sensor: a HIGH pulse whose duration is the time (in microseconds) // from the sending of the ping to the reception of its echo off of an object. pinMode(echo_Pin, INPUT); duration = pulseIn(echo_Pin, HIGH); // value = microsecondsToCentimeters(duration); // convert the time into a distance value = (duration/58.138); Serial.print(value); Serial.print ("cm"); Serial.println(); // Displays readings one beneath other. delay(500); // Rate of displaying the readings // Update parked status int parked = value != 0 && value < 54; { if (parked) { Serial.println("Car Parked"); digitalWrite (redledPin, HIGH); delay(a); digitalWrite (redledPin, LOW); } else { Serial.println("Car Gone"); digitalWrite(greenledPin, HIGH); delay(a); digitalWrite(greenledPin, LOW); } } #ifdef SEND_STATUS_TO_CONTROLLER send(msg.set(parked)); #endif oldParkedStatus = parked; //lastSend = now; }
While this code runs succefully (I Hope)
I would like to send the collected data on to a wordpress site from the Raspberry Pi 3 (RP3 is hosting one already). I would prefer to send it to an OpenHab or a controller to implement some functions.
But the main issue I am facing is this error.
The configure used is
Some help would be appreciated.
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
@mfalkvidd
Thanks !
However I am still facing some issues trying to set up a gateway with the raspberry pi,Do you know who could help me with that ?
-
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
Just resolved the issue !
Apparently my Arduino Ide wasnt updated to the lastest version which explains why I never found the Library Manager
-
RE: 💬 Building a Raspberry Pi Gateway
I m sorry I m new to using a raspberry pi and its for a project.
But if this is not what you asked for could you be a little more specific :$ -
RE: 💬 Building a Raspberry Pi Gateway
@marceloaqno !
Is this what you meant? -
RE: 💬 Building a Raspberry Pi Gateway
I am using a Rasp Pi 3 as well.
I can't even proceed further in the tutorial cause of this error cause nothing works after it. -
RE: 💬 Building a Raspberry Pi Gateway
ran sudo ./bin/mysgw -d
I keep getting mysgw: accept: Bad File Descriptor.
Any possible cause ? -
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
I have been working on the installation of the libraries.
I have Added them to the Arduino ide software but when I run the gateway serial code it shows that
fatal error: MySensors.h: No such file or directory
compilation terminated.What is causing this?
PS I am using a Macbook -
RE: Sending sensor data from raspberry via NRF24L01+ to arduino
Thank you so much for getting back to me!
When you mean serial gateway is it something where the Arduino is directly connected to the pi?
I wasn't sure which code to implement on the Arduino to send the sensor data.
What I need is a code from the Arduino to send the data from an ultrasonic sensor to a database (or something) on the pi using the NRF modules. -
Sending sensor data from raspberry via NRF24L01+ to arduino
I have been looking at instructions to set up a communication system where I can send my Arduino data to a Raspberry Pi via a NRF24L01+.
I have used this link: https://www.youtube.com/watch?v=_68f-yp63ds&lc=z12wivkbyr3uzleri04ccblr3wflyntwpgk
While everything run there is no data sent or received.
If anyone could give me an advice or correction or even provide me with a new insturction link it would help !
I am planning to send ultrasonic data or a HMC5883L data to the pi.