
Hi guys.
I need a little advice on some additional sensors I was thinking of adding to my bot, and as I am still waiting for my dev kit and extras to arrive, I am unable to test what I am thinking of doing so I'm hoping someone can point me in the right direction.
I had an idea of adding a smoke detection sensor and maybe a temperature sensor as well. The idea being that if I ask the bot what the current temperature is, or if the bot detects smoke or Co2 fumes, the bot would respond with verbally with a pre-recorded MP3 file of the Cepstral voice I have, or one better, have my bot tell me what room the smoke or gas is detected in. Here are a couple of links to what I am thinking of adding.
Would these sensors be compatible with the EZ-B v4 and 7.4 LiPo battery? I see that the temperature sensor is compatible with Arduino so I am hoping that both of these sensors will play nice with the v4. Also, has anyone tried something similar to what I am thinking of doing? As always, any help or advice anyone can offer would be greatly appreciated.
Cheers,
Steve.
That would work if you can lose the digital ports power. You could make a quick protoboard strip for 5v and gnd which comes off of a digital port too...
Digital port to regulator to protoboard strip of pin headers... as long as the demand doesnt exceed 1a it'll be ok.
I must admit you lost me a little there Rich, sorry. What do you mean by "losing digital ports power"? I take it a straight digital ground and Vcc connection to regulator, to sensor, is not advisable? What would the protoboard be needed for exactly?
Success with the smoke sensor. After reading that Richard had one working with Arduino I plugged my one in to an ADC port, used the "Read ADC" control, blew some smoke at it and the values changed very well. It is now installed in to K-9's face plate.
Now I need to learn (quickly) how to scrip this so I can have say that smoke is detected using SayEZB(). I say quickly as I don't want to smoke out the house trying it out.
@Steve... Use the GetADC(adc0)) to read an analog value of your smoke detector... something like this in a script (it will obviously have to be put in a loop or use whatforchange statement)
Many thanks Richard. I did write a script similar to yours this evening but couldn't get it to work as I made a mistake on line 1.
Now I see what my mistake was, using the wrong syntax which should have been getADC(adc0) .
Thanks again.
Sorry, was replying from my phone so was a lot more brief than usual.
By taking the Vcc and Ground from one of the digital ports you will not be able to use those pins for something else, i.e. you lose those 2 pins. Not a problem if you are using a H-Bridge or Ping sensor as only the signal pin is required for at least one port on both of those items.
The protoboard, pretty much is this...
Red & black wires on the bottom just indicate soldering and if it's Vcc (red) or Ground (black)
One EZ-B Digital port feeds the regulator. The regulator then feeds one strip on the protoboard with +5V regulated and Ground. 5V sensors etc, can then plug in to pin headers soldered to the protoboard (at least the power can).
No problem. Thanks for clearing that up Rich. It does so happen I do have some spare ground and Vcc pins left over from my ping sensor and H-bridge too, so no problems there.
Ps. Hope you had a nice holiday dude.
Okay. The smoke detection sensor is working well so putting this one to bed. Thanks everyone for your help with this. Thanks to this, I am starting to understand EZ Script a little better now
.
Now I would like to get the temp sensor working if I can. It,s not that importand, but as I have it I would like to use it, and get a better understanding of how UART works. I have plugged it in to D6 as I believe this is one of the three UART ports. I have the ground and vcc going through the 5v regulator, and the signal wire going to the D6 signal pin as, if i got this right, this is the RX (receive) pin. I wrote a quick UARTinit() script but that's as far as I can get. So three questions...
Should I be using the D6 RX signal pin, or D5 TX signal pin?
What URAT port number is the D6 port?
I tried to write a UARTRead() script but it comes up with an unknown command error, and I also noticed that the intellisense only has two choices, UARTInit(boardindex, port, baud) and UARTWrite(boardindex, port, data). Any ideas to why I cannot use the UARTRead? confused confused
Good luck with the UART.... I still haven't been able to get to work with receiving data greater than 8bit... You going to need to use the GetByte and GetByteAt commands as well... There is a UART example in ARC, why don't you start with that first...