Oh.. for the gas sensor they are ok. Last one (green) seems a little bit more polished. The presence of the usb port is not important, you can solder it off. The usb is the output. Check the picture again. It's your choice.
Vladut Grecu
Posts
-
Powering with LiPo a mini pro without regulator -
Powering with LiPo a mini pro without regulatorNeither. Those will boost it till 5v. You need something like this.
-
Clone 2 skelets Relay and Button's@tomrask said:
From your serial output, I think that the problem is with vera.(config, etc.. I don`t use vera)
The node presents your devices and the gateway recognizes them correctly.send: 1-1-0-0 s=0,c=0,t=3,pt=0,l=5,st=ok:1.4.1 The nr 0 relay has been presented send: 1-1-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1 The nr 1 relay has been presented send: 1-1-0-0 s=2,c=0,t=0,pt=0,l=5,st=ok:1.4.1 The nr 2 switch has been presented send: 1-1-0-0 s=3,c=0,t=0,pt=0,l=5,st=ok:1.4.1 The nr 3 switch has been presented send: 1-1-0-0 s=4,c=0,t=0,pt=0,l=5,st=ok:1.4.1 The nr 4 switch has been presentedI guess you pressed the buttons to test them but when you press button nr 3 (child4) you got an error
send: 1-1-0-1 s=4,c=1,t=0,pt=2,l=2,st=fail:1 read: 1-0-1 s=4,c=1,t=0,pt=2,l=2:1You either wrongly configured vera to use child 4 as something else rather than a button (and it doesn't expect for an update, even if you present it as a button and it says that is ok) or it's beyond my understanding.
I will kindly ask @hek to to take a look over what I said and verify the integrity of the code presented but before that, I'll try to do your setup and report back.
-
[Tutorial] Raspberry Pi NRF24l01 direct connectionHere is a script I made that does all the things above
RasNRF-GPIO.sh
Tell me how it went. Did it helped you? Did you found a bug? Any input, bad or good is appreciated. -
Scene controller based on old x10 remote@hek
Sometimes simple is just to complicated in a complicated world. Most of us are used to old forums format :D -
Scene controller based on old x10 remote@tigra
Idiotic question.. That remote had a wireless thingy.. Why not use that? -
[Tutorial] Raspberry Pi NRF24l01 direct connection[EDIT] - I uploaded a script in the next post that does everything I explained below
I have installed MINImal raspBIAN which is a raspBIAN without a gui. So this should work for you guys.
First of all you have to
1. Undo your Overclock. If you have any. (SPI does not like Overclocked pi's)2. Enable SPI
Details:
On a normal raspbian image this can be done either on a fresh install (when you config your pi) or you can type in terminal
sudo raspi-config
From there you go into ADVANCED OPTIONS -> SPIOn a minimal image you don't have the luxury of raspi-config. You have to manually activate it.
(I already had it enabled but you can check)
(If you don't have sudo installed on your image just runapt-get install sudo)sudo nano /etc/modprobe.d/raspi-blacklist.confMake sure there IS a # before blacklist spi-bcm2708, so it looks like this…
#blacklist spi-bcm2708If there is no line like that, you can add it. It won't do any harm.
CTRL+O - Save
ENTER - Confirm
CTRL+X - Exitor
CTRL+X - Exit
y - I want to save the file
ENTER - ConfirmWe have to edit now the config.txt.
sudo nano /boot/config.txtadd this to the end of the line
dtparam=spi=onSave and exit.
Reboot your pi.
sudo rebootEnjoy using SPI. (Source)
3.Downloading the files
Details:
You have 2 options. wget and git-clone. I'll start with:
a. git-clone
If you don't have git-clone you need to install the git tools. (Yes, git is related to github)
sudo apt-get install gitAfter you installed git you simply navigate to the folder that you wish to install the program and type:
sudo git-clone https://github.com/mysensors/Raspberry.gitThis will download a zip, unarchive it and.. It does all the jobs for you.
b. wget
Some ppl are old-school and go the hard way or they just enjoy it done this way.
Navigate to the folder that you wish to install the program and type:
wget https://github.com/mysensors/Raspberry/archive/master.zip(this will download you the zip)Unzip the file
If you don't have unzip installed just type
sudo apt-get install unzipunzip master.zip -d /home/pi/Raspberry(you can specify any directory that you want instead of the /home/pi/Raspberry)4.Edit and compile what you downloaded
In the Raspberry folder you have some files and some folders.
The majority of ppl (including me) forget to complile the libs for the NRF24l01.
This is the library provided by [TMRH20]{http://tmrh20.github.io} (He has some interesting stuff there including an audio library for NRF24l01.)
Back to our stuff.
Go to the Raspberry folder then into librf24-bcm.
cd Raspberry/librf24-bcm/Type
makeGo back to the Raspberry folder
cd ..Type
make
5.Connecting the NRFMister TMRH20 tells us that we need to connect the NRF24l01 this way
PIN NRF24L01 RPI RPi -P1 Connector 1 GND rpi-gnd (25) 2 VCC rpi-3v3 (17) 3 CE rpi-gpio22 (15) 4 CSN rpi-gpio8 (24) 5 SCK rpi-sckl (23) 6 MOSI rpi-mosi (19) 7 MISO rpi-miso (21) 8 IRQ Not ConnectedConnect everything like that except for the CE pin
Run the PiGatewaySerial
./PiGatewaySerialIt shoud prin something like this:
Starting PiGatewaySerial... Protocol version - 1.4 Created PTY '/dev/pts/1' Gateway tty: /dev/ttyMySensorsGateway ================ SPI Configuration ================ CSN Pin = CE0 (PI Hardware Driven) CE Pin = Custom GPIO25 Clock Speed = 8 Mhz ================ NRF Configuration ================ STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0 RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xc2c2c2c2c2 RX_ADDR_P2-5 = 0xff 0xc4 0xc5 0xc6 TX_ADDR = 0xe7e7e7e7e7 RX_PW_P0-6 = 0x00 0x00 0x20 0x00 0x00 0x00 EN_AA = 0x3b EN_RXADDR = 0x07 RF_CH = 0x10 RF_SETUP = 0x23 CONFIG = 0x0e DYNPD/FEATURE = 0x3f 0x06 Data Rate = 250KBPS Model = nRF24L01+ CRC Length = 16 bits PA Power = PA_LOWLook at line 7
CE Pin = Custom GPIO25
Connect the CE pin where it says you should.Here are some pictures with the GPIO connector on the rPi.
https://www.google.ro/search?q=raspberry+pi+gpio&tbm=isch -
Powering with LiPo a mini pro without regulator@m26872 said:
the power loss from extra cycles would be neglectable
You are right. But 220uA are neglectable aswell. (For me at least)
-
Clone 2 skelets Relay and Button's@tomrask said:
Please modify your sketch like thisfor (int sensor=0, pin=RELAY_1; sensor<NUMBER_OF_RELAYS;sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) gw.present(sensor, S_LIGHT); Serial.print("\nThe nr "); Serial.print(sensor); Serial.print(" relay has been presented\n"); // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) digitalWrite(pin, gw.loadState(sensor)?RELAY_ON:RELAY_OFF); }and
for (int i = NUMBER_OF_RELAYS; i < (NUMBER_OF_RELAYS+NUMBER_OF_SWITCHES); i++) { gw.present(i, S_DOOR); Serial.print("\nThe nr "); Serial.print(i); Serial.print(" switch has been presented\n"); delay(250); }And post the serial output again.
-
Clone 2 skelets Relay and Button'sThere is something going on with you code. It tells your gateway that you only have 3 devices (0,1,2)
send: 1-1-0-0 s=0,c=0,t=0,pt=0,l=5,st=ok:1.4.1 send: 1-1-0-0 s=1,c=0,t=0,pt=0,l=5,st=ok:1.4.1 send: 1-1-0-0 s=2,c=0,t=0,pt=0,l=5,st=ok:1.4.1I'll look into it when I get home, later this day.
-
Powering with LiPo a mini pro without regulatorThe rezistors + the code that needs to be run? The extra cycles for you to read the Analog pin? I go with the idea that if there is allready a measuring in the arduino anyway why do i need to reinvent the wheel? The voltage divider thingy is ok if you want to measure voltages that go over the vcc value
-
Powering with LiPo a mini pro without regulatorWhat I don`t get is why you want to cut the 3.3v regulator when you only get a 220 micro Amps consumption reduction and the resistors that you use to measure the actual voltage over the Analog pin use way more..
Use the internal arduino voltage measure. You will see 3.3v even if you get over 3.3v but what you actually need know is when the voltage drops under 3.3v so you know when you have to start recharging your li-po.
-
Powering with LiPo a mini pro without regulatorThe original nrf may support 3.6 but the chinese models that i have die faster :'/
-
sensor library compile problem after a change (SOLVED)Glad to be useful. I am using the tmrh20 libs.
https://github.com/tmrh20/RF24 -
sensor library compile problem after a change (SOLVED)Can you check your
RF24.cppandRF24.hto be certain that you have theRF24::printDetails();function?
Do you include theRF24.h? (I know that it would throw you more errors if you didn't, but better be sure than sorry :D )
Try using it in another sketch and see if it's working.
I used your code and it compiled. -
Powering with LiPo a mini pro without regulatorIt lasted 2 minutes because you read the sensor way to often. For an extended battery life you need to put the arduino to sleep for as much as possible and read the sensors value very rarely.
-
nRF24L01+PA+LNATake a look here https://www.youtube.com/watch?v=lR60toEjHl8
-
Raspberry GPIO NRF24l01+ make errorMove the pin on 22. The actual 22 pin not gpio22. Full restart the pi.
I think you can cat the
/dev/ttyMySensorsGateway. In the way I use it(with pimatic) all the commands are logged. -
Clone 2 skelets Relay and Button'sCan you post the serial output of the Arduino?
-
Raspberry GPIO NRF24l01+ make error@sj44k
Tell me where did you connected the CE Pin on rPi..
Do you have another Arduino so you can burn a serial gateway into it? So we can be sure that your Mega is sending and receiving properly?
From your Arduino output he clearly does not link with the nrf on the Raspberry.