Ok so I haven't been around for a while with work but have decided on a project to keep me sane.
first is the sensor array, basic weather station, amp meter to tell me how much power my house is using, a few others that I may add later
next is the do stuff portion, remote for the TV, lights on and off (will be going with LED's for this) and anything I want to add later
last is the home base, now this is where it gets fun. the home base hooks up to my raspberry pi (or computer) and allows me to monitor everything.
what I want to do at the end is have it so the homebase has NRF24l01 module on it to send and recieve. all children will have same module
the children (sensor or other) will be probed (apparently 255 addresses obtainable, but want bout 10-20) each will be probed every second so its close to realtime stats. the other thing I will do is have the children tell the parent what it is, so for the amp meter it tells the base "amp meter" then also tells it how many different reading it can give. home base deciphers this and displays raw data as graph, grid, base numbers.... or if you really want as machine code, whatever takes your fancy.
the do stuff children tell the base what it does "tv remote" then tells it what options are available " channel up, down; volume up down; source, etc" the base then knows this and sends commands back when you click the corresponding button
the issues I am facing
a) my coding is like watching a fish climb a tree,
b) I have read that the NRF has 255 channels but can only read 6 at a time, does this mean you can only program for 6 or it reads 6 at once then can move on to another 6?
c) while I can replicate code from other people who have made similiar projects and stumble my way through the arduino stuff I can't figure out how to make the windows or linux part yet.
so this is the start of my log star date old. if anyone recieves this by all means please offer any advice, code etc to help me out.
I'm not clear whether you have implemented a few parts of this already and are just asking about the NRF stuff or whether you are, as you say, at the bottom of the tree on all parts.
Also it would be helpful if you can tell us what your programming and electronics experience is.
If you are a complete beginner this is a very ambitious project and I suggest you spend a few weeks learning the basics from the examples in the Arduino IDE.
Have you got access to an NRF24 datasheet? It will have the facts about what can and can't be done. However if you are a beginner I would leave that to one side for a while.
done alot of the tutorials
have the NRF's
am designing shield for lighting
coding just doesn't stick in my head for whatever reason
I can see what each element does I just can't manipulate it enough to make it do everything I want
will look at your guide now
freerpg:
coding just doesn't stick in my head for whatever reason
Develop your project as a lot of little pieces. Get each piece working with as short a piece of code as possible. later on you can worry about joining the bits together.
Build a very simple system to learn about sending data between the NRF's. Just start with sending simple fixed messages such as N1, N2 etc - just enough to identify where the data comes from.
It will be much easier to get help here if the code you post is short and only deals with one thing.
ok so going to get it to do so much, having to learn coding for pi and arduino I thought would be simple but apparently not
going to find a local mob that is going to help out
Just my take, forget pi programming just dump all the data into a log file on the pi or another pc and simply use the easy tool of your choice ?spreadsheet? to read the log and present any pretty pictures/graphs you want.. a little application script to poll the source data periodically should be easier to sus than a whole new language on a new platform.
1 second polling may be a bit ambitious some sensors may need more time than that to produce a valid reading on further polls
rather than set such a target just log the time with the data when you write it, and let your spreadsheet or graphing tool deal with the plotting issues.
get basic simple sketches together accessing all the h/w you want to use individually, the example sketches that come with most libraries are a great starting point.
document each one well including the wiring used to connect to the arduino and what pins are used.
with a complete set of basic sketches accessing your h/w you can start to stitch them together and any h/w conflicts over gpio pins should be easy to spot and solve with reassignment.
spread sheet is great idea for reading values but when I want to turn on lights I can't do that
I am also looking at making it create a spreadsheet eventually to graph what I need but will check how the first versions go.
the idea for me though is having a very generic software app.
the arduino tells the software on the computer "hey I got 4 buttons 1,2,3,4 and a rotary encoder 5"
the software then displays all these options and allows you to manipulate wirelessly.
also having options to say "hey i got a sensor and here is its reading" so the computer then takes the time and reading.
was doing some thought and 128 channels (of which I would use a quarter at best) is only 4 minutes cycle if I allow 2 seconds per item. this will still give a pretty good review of what is happening. the things I am stuck on is ALL the coding and figuring out what sensors are need to be polled more frequently(a fridge or air con can turn on for just a couple of minutes so the watt meter might need to be polled more often for example)
freerpg:
the idea for me though is having a very generic software app.
the arduino tells the software on the computer "hey I got 4 buttons 1,2,3,4 and a rotary encoder 5"
the software then displays all these options and allows you to manipulate wirelessly.
This is a great deal easier to say than it would be to implement.
However writing a PC program with predefined buttons, etc to match whatever is in the Arduino program is perfectly feasible - as my earlier simple example illustrates.
What would NOT be feasible is using the Arduino to detect the encoder pulses and using the PC to assess them and send back appropriate commands. The chain of communication between the Arduino and the PC would be too slow for that. The encoder must be managed within the Arduino in response to high-level commands from the PC.
what i was thinking for the encoder and pc is on the PC have a slider(this would read the actual state of where on the scale it is so makes it harder) or + and - symbol. the encoder and the buttons on the PC do nothing more than tell the arduino to go higher or lower, so theoretically the encoder can be at any angle and when I turn down the "light or speed" on the PC the arduino just sets it lower. it reads the state of the encoder and if I go higher or lower it goes higher or lower. the encoder and pc only have the option of going higher or lower not predefining a position like a potentiometer.
I am hoping to code it so the +and - on the PC does exactly what turning the encoder does just a secondary way of doing it.
like in a stereo you can turn the volume up and down via remote or via the volume knob on the stereo. they do exactly the same just one is on the unit the other is remote
these should get you started, they are a 2.4ghz tranciever and they can use a multitude of channels.
also they range from bout $1.50 up to $20 depending on range. from what I gather programming is same for all. I was going to buy 2 of the decent range ones and bout 10 of the small range ones. I was also looking at using them to echo commands one da to extend range but right now if they transmit 5metres and do what I want it to do it will be a huge step.
http://www.mysensors.org/build/components#the-brain this page shows the basis for what I want to do but am going to extend on theirs. what I see is you have to tell the computer what type of sensor you have, what I want the arduino to do is tell the nrf to transmit its details and then the PC can send commands back or get readings. even if I have to set it up so channels 1-10 are weather 11-20 are power usage 21-30 are on/off switches etc. then I will be happy
I thought you were the person who wants to get started ??
I was going to buy 2 of the decent range ones and bout 10 of the small range ones. I was also looking at using them to echo commands one da to extend range but right now if they transmit 5metres and do what I want it to do it will be a huge step.
In my opinion you have too many ideas for your own good at this stage.
Get an Uno and get one small part of the project working - when you have done that, try another small part.
freerpg:
spread sheet is great idea for reading values but when I want to turn on lights I can't do that
I am also looking at making it create a spreadsheet eventually to graph what I need but will check how the first versions go.
the idea for me though is having a very generic software app.
the arduino tells the software on the computer "hey I got 4 buttons 1,2,3,4 and a rotary encoder 5"
the software then displays all these options and allows you to manipulate wirelessly.
also having options to say "hey i got a sensor and here is its reading" so the computer then takes the time and reading.
was doing some thought and 128 channels (of which I would use a quarter at best) is only 4 minutes cycle if I allow 2 seconds per item. this will still give a pretty good review of what is happening. the things I am stuck on is ALL the coding and figuring out what sensors are need to be polled more frequently(a fridge or air con can turn on for just a couple of minutes so the watt meter might need to be polled more often for example)
well most spreadsheet apps have a macro or script language bundled in so a button and a serial send should be a case of drag n drop and a few lines of script code..
as said concentrate on one job at a time get a puter interface talking to the arduino turning on and off a single pin and expand from there.. if you want a pointer as how you could progress the arduino pid library has a wirring or processing front end that runs on a pc which graphs in real time temperature data and allows the configuration of arduino settings on the fly..
so how about automating your electric hot water supply with pid controll a 40amp ssr and heatsink is the hardware u need and a 3.5v digital pin switching on and off under the pid lib control is all u need to control the ssr on and off so running the lid lib example on the arduino and the front end example on your pc will give you A template you could follow or take aspects of to include in your own solution.
my approach to arduino development is to get the example sketches for the h/w i want to use doing things i want to do and then when i have a full set of working basic sketches start to join them up one at a time.
start with the UI, lcd and buttons, or in your case a PC front end, and add in each element one at a time.
stealing the idea from here, adding some components like a momentary switch and rotary encoder for adjusting the lights at the source
I know that I have to include a read state line something like
"if momentary switch is pressed then change state // if on then turn off if off then turn on
if rotary encoder is turned clockwise then light goes brighter
if rotary encoder goes anticlockwise then light goes dimmer
send state via NRF to openhab controller"
I know what I need to do.... dunno how to program it