| Author |
Message |
|
|
Posted: Jun 26, 2009 - 04:25 PM |
|

Joined: Jan 20, 2009
Posts: 13
|
|
I am new to this, I need to develop a code capable of receiving a digital input on the MeshBean2 borad Development kti ZigBit 900 from Meshnetics and then send the result to another wireless MeshBean2 board. I requested technical support for finding a digital port on the board and either an inteerupt or a internal clock they just sent me the datasheet and recommended to use the peer2peer sample applicatio. Well, this application is too much for such simple task and I need to scan the whol C code for nothing, I just need someone who already developed simple application for sending and receiving data from one wireless node to another, and/or a code that reads data data from a digital port. Anyone has used or developed something similar using ZigBit? Any kind of help would be appreciated, it is a simple application but I am new to this. ui also attached the code for the peer2peer but it just doesn't make sense to me to use all of this code. I just need more simple code.
Thanks,
[moderator: you picked the wrong forum for your post so I'm moving this from Academy]
[moderator: I've now found THREE identical copies of this post - please do NOT cross post in future - pick the most relevant forum (AVR Forum in this case) and post there - it does not help to post multiple copies and simply annoys folks who waste their time answering one copy only to find someone else already said the same on another copy] |
|
|
| |
|
|
|
|
|
Posted: Jun 26, 2009 - 05:25 PM |
|

Joined: Nov 17, 2004
Posts: 13846
Location: Vancouver, BC
|
|
Also a more descriptive thread title would be nice. Pretty much everybody who posts here needs help (some in more ways than one ) |
_________________ Regards,
Steve A.
The Board helps those that help themselves.
|
| |
|
|
|
|
|
Posted: Jun 26, 2009 - 06:57 PM |
|


Joined: Apr 15, 2009
Posts: 4863
Location: San Jose, CA
|
|
Actually peer2peer is a good example of what you need.
Believe me, you'll spend much less time adopting peer2peer code to your needs than looking for simpler example.
Follow this steps:
1. Take full application (not only one peer2peer.c) from ZDK.
2. Compile it and make sure everything works as expected.
3. Start cutting unneeded things away. Start with UART-related stuff. After removing this code you still will be able to test data transmission by pressing a button and watching LEDs.
4. At this point you'll have short example suited for you needs. Just add reading of data.
I'll be happy to help you just start this work and ask particular questions. |
|
|
| |
|
|
|
|
|
Posted: Jun 29, 2009 - 06:43 PM |
|

Joined: Jan 20, 2009
Posts: 13
|
|
| Thanks alex, i will do that and start asking the right questions. |
|
|
| |
|
|
|
|
|
Posted: Jul 08, 2009 - 06:08 PM |
|

Joined: Jan 20, 2009
Posts: 13
|
|
I am trying to understand how this code call the appOpenButtons and appOpenLeds functions although these functions are not declared anywhere else in the code. Does anyone know how this work?
void APL_TaskHandler(void)
{
switch (appState)
{
case APP_INITIAL_STATE: // Node has initial state
initSerialInterface(); // Open USART
appOpenButtons(NULL, buttonReleased); // Open buttons
appOpenLeds(); // Enable LEDs
initNetwork();
SYS_PostTask(APL_TASK_ID); // Execute next step
break;
case APP_NETWORK_JOINING_STATE:
startBlinkTimer();
startNetwork();
break;
case APP_NETWORK_JOINED_STATE:
default:
break;
}
} |
|
|
| |
|
|
|
|
|
Posted: Jul 09, 2009 - 07:02 AM |
|


Joined: Apr 15, 2009
Posts: 4863
Location: San Jose, CA
|
|
|
hamdo_55 wrote:
I am trying to understand how this code call the appOpenButtons and appOpenLeds functions although these functions are not declared anywhere else in the code. Does anyone know how this work?
They are macroses and defined in .h file.
PS: These macros are used to make code more platform independed, but it makes code a little bit hard to understand.
For your application (if you are sure about LEDs and other stuff on your board) just use related BSP_*() functions.
PPS: handy rule: anything that starts with app*, App* and APP* is defined somewhere in application directory. |
|
|
| |
|
|
|
|
|