Newbie looking for help starting project

Started by teedo757, August 18, 2014, 05:07:54 PM

teedo757

I am new to arduino but have read a few books and done some tutorials. I liked the low power aspect of the moteino so I ordered one with the RFM69HW and another RFM69HW chip. I downloaded the libraries from the website and put them in the library folder for the arduino program. What I would like to do is program to moteino to read a sensor (temp) and just send it to the arduino with the other wireless chip. When looking at the code for the RFM69HW I dont see where I specify what pins are going to be used between the arduino and the chip. I have them hooked up to the TX & RX but at this point I would like to take a step back and figure out what exactly I am doing and looking at before I proceed. I have looked for some tutorials but have not found anything. Does anyone have a good source that will help me understand how to wire the RFM69 to my arduino and how to start the process or getting them to "talk" to each other? Thanks in advance and sorry for being so green :)

dom67911

When moteino get delivered as pairs, one is a sender and the second a receiver. If you have not changed anything, they should just work. So, connect the receiver to a raspberry pi and start the Gateway.py using "sudo". Once you provide power to the sender you will immediately start seeing text being captured by the python gateway script. I'm mentioning these since they are a good starting point to understand how they talk to each other.

If you have already uploaded anything else and changed what comes pre installed then I recommend finding the sender and receiver sketches in lowpowerlab and upload them to each accordingly. Again, these are really good way to get the basics.

Once you noticed how they talk to each other then you can proceed. You should not need to change anything in the receiver at all. Just the sender. To this one, unplug, connect a temp sensor to A0 and look online for example sketches.

Basically, just focus on the setup() and loop() functions. Don't change any other files. That's more advanced stuff and not needed until you have done a few projects. I'm writing from a mobile device now so I cannot give examples. Good luck. Take your time. It's worth it.

Felix

Thanks dom67911,
I would add that for a while I started shipping all Moteinos with the Node sketch only.
One will need to be loaded with the Gateway sketch.
I would always suggest to start with the Node and Gateway sketches. They need to be configured to match the hardware frequency and whether it's a HW unit or not (actually just comment/uncomment the relevant settings). Once you get those two loaded and Moteinos talking back and forth you can start adding more logic to those sketches and read sensors etc.

If teedo757 is talking about wiring RFM69 radios directly to a UNO then that's a different topic, and is covered in other discussions in this forum.

teedo757

Yes I am trying to wire a RFM69 to an UNO board on the other end. Here is what I get in the serial monitor when I load the Gateway sketch:

Listening at 433 Mhz...
SPI Flash Init FAIL! (is chip present?)

I was looking and am I correct that this is ok.....the SPI Flash is for wireless programming and you need to have flash memory to make it work or is there a problem with the wireless chip?

teedo757

OK I found this article: http://bitknitting.wordpress.com/2014/02/22/making-an-rfm69-breakout-board/ which really makes me think I may not be using the right parts to create a simple project. If anyone has a suggestion that would be great......here is the project in it's simplest terms. Moteino connected to a sensor (battery powered) --> A receiver that has wifi, storage, web server and some I/O pins to turn stuff on and off (think of a red, orange, blue LED to show temp outside). I want a wifi shield to enable access to the receiver from my phone and see stats that would be stored on the device. The receiver would be AC powered so i'm less worried about power consumption. I realize I have a ton to learn but I also know starting with the right pieces can alleviate a lot of headaches. Any suggestions would be appreciated.

Side note: I bought and read Programming arduino by Simon Monk, does anyone have any other books they would recommend?

Felix

The main thing you need to keep in mind when using a stock Arduino (like UNO) is that those run at 5V whereas the RFM69 radios run at 3.3V and it's critical that you do the level conversion between the signals going INTO the RFM69 (also VCC INTO RFM69 needs to be <= 3.3V).