![]() * Listens for messages from the transmitter and prints them out. * Simplest possible example of using RF24Network, Version 2 as published by the Free Software Foundation. Modify it under the terms of the GNU General Public License This program is free software you can redistribute it and/or Here's the Rx part //ONLY RUNS UNDER ARDUINO 1.0 Serial.print(DallasTemperature::toFahrenheit(tempC)) Serial.print("Error getting temperature ") Int tempC = sensors.getTempC(deviceAddress) Void printTemperature(DeviceAddress deviceAddress) RF24 makes use of the standard hardware SPI pins (MISO, MOSI, SCK) and requires two additional pins, to control the chip-select and chip-enable functions. ![]() On the other end, you'd use myStuff.data as the receive buffer and read the values using myStuff.temps to get the nth temperature. The payload to send, then, is myStuff.data, with a size of 12 bytes. RF24NetworkHeader header(/*to node*/ other_node) īool ok = network.write(header,&payload,sizeof(payload)) Many examples are included to demonstrate various modes of communication. Simple to use for beginners, but offers advanced configuration options. Core library for nRF24L01 (+) communication. See the tutorial on how to obtain these addresses:ĭeviceAddress Probe00 = RF24 Communication Radio driver, OSI layer 2 library for nrf24L01 (+) modules. Assign the addresses of your 1-Wire temp sensors. Pass our oneWire reference to Dallas Temperature. Setup a oneWire instance to communicate with any OneWire devices *-( Declare Constants and Pin Numbers )-*/ Center = Signal (Pin 2): (with 3.3K to 4.7K resistor to +5 or 3.3 ) * YourDuino Multiple DS18B20 Temperature Sensors on 1 wireĭS18B20 Pinout (Left to Right, pins down, flat side toward you) I am curious to understand how Whandall determined that both modules are non functional. I'm running 8 DS18B20 sensors but hope to run more The NRF24 on the mega however is powered by the Mega board 3.3V pin itself. Tx from Uno seems OK but Rx on Mega doesn't report same temps as Tx'd Still having problems with wireless comms between Uno (Tx) & Mega2560 (Rx) can you help please? Ret = cosmclient.put(feed, cosmKey) // SEND FEED TO COSM Finally, wrap the datastreams into a feedįloat OutTemp = (sensorValue(OutThermo)) įloat DrainTemp = (sensorValue(DrainThermo)) Define the strings for our datastream IDsĬhar bufferValue // enough space to store the string we're going to sendĬosmDatastream(sensorId0, strlen(sensorId0), DATASTREAM_FLOAT),ĬosmDatastream(sensorId1, strlen(sensorId1), DATASTREAM_FLOAT),ĬosmDatastream(sensorId2, strlen(sensorId2), DATASTREAM_FLOAT),ĬosmDatastream(calcId1, strlen(calcId1), DATASTREAM_FLOAT), ![]() I didn't realise you had to "wrap up" data packets, but it sounds similar to the procedure for cosm. ![]() I have not had a chance to use my NRF24s but I have been sending data to the internet via cosm. My major problem is that I don't know how to 'wrap up' my digital sensor data (12bit) from 6 DS18B20 sensors on the Uno into a packet for transmission across the wireless link to the Mega. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |