Pinguino Forum
Problems loading a zigbee example in pinguino micro - Printable Version

+- Pinguino Forum (http://forum.pinguino.cc)
+-- Forum: Software (http://forum.pinguino.cc/forumdisplay.php?fid=7)
+--- Forum: Syntax & Programs (http://forum.pinguino.cc/forumdisplay.php?fid=19)
+--- Thread: Problems loading a zigbee example in pinguino micro (/showthread.php?tid=3941)



Problems loading a zigbee example in pinguino micro - TuxD3v - 17-05-2013

Hi guys,

i have a pinguino micro, and zigbee modules...

first of all i need to understand some things and the best is test something simple...

So in the pinguino micro page of olimex a downloaded the example for zigbee.

Copy & paste the code and compiled, after that i have send it to pinguino board.

The first code apears:
----------------------------------------
Press a key to init the ZIGBEE module
-----------------------------------------
Connection to module is open. Now you need to:

1) Push the RST button on the MOD-ZIGBEE coordinator
---to start a fresh network. It should repost 'joining permitted'

2) Power up/reset your ZIGBEE sensors; they should find the
---network automatically; Pinguino will report adding a new device
---at the first available position. Note: Default free positions are 5
---but you can change that in the source code of the example

3) After connecting all your devices to the network, press the
---button next to the C17 resistor on your MOD-ZIGBEE coordinator
-----------------------------------------

but if i follow the instrucções I receve NOTHING in the virtual console.

the idea is catching the info that zigbee module is sending to uart2 of pinguino micro, and it send it to the virtual serial port to computer...to be visualized...

Anny idea?It is implemented with a interrupt, i am a newbie in pic processors, i am quite lost on it.

Any help?

regards
tux


RE: Problems loading a zigbee example in pinguino micro - regis - 17-05-2013

If you need to test something simple try examples in 04.Communication/Zigbee and change Serial to CDC.


RE: Problems loading a zigbee example in pinguino micro - pingotg - 17-05-2013

Good idea!

Please post back with what happens. Someone else may want to do it.

John


RE: Problems loading a zigbee example in pinguino micro - TuxD3v - 19-05-2013

Hi,

i have a problem...

I think that boot loader, already configures the USB CDC right?
but when it resets micro(to run user code)... the USB stills enabled, or my program have to enable USB Again?


thanks in advance.

regards
tux


RE: Problems loading a zigbee example in pinguino micro - regis - 19-05-2013

Sorry, I don't really understand what the problem is ... but there is nothing special to do before using CDC functions.

(19-05-2013, 06:34 PM)TuxD3v Wrote: Hi,

i have a problem...

I think that boot loader, already configures the USB CDC right?
but when it resets micro(to run user code)... the USB stills enabled, or my program have to enable USB Again?


thanks in advance.

regards
tux



RE: Problems loading a zigbee example in pinguino micro - TuxD3v - 20-05-2013

hi,
i am using c = Serial.getKey(uport);several times...

when i compile the code i get:

compiling...
/home/tuxd3v/pinguino/x.4/source/user.c:275:3: error: too many arguments to function 'serial1getkey'

/home/tuxd3v/pinguino/x.4/source/user.c:278:3: error: too many arguments to function 'serial1getkey'

error while linking /home/tuxd3v/Desktop/Newfile0.o
You can review the file stdout (F8) for more information.

i am using uart2 to speak to zigbee module and uart1 to debug and usb to receive the data...

i don 't know whats wrong... :S

is there any way to chose to send data to uart1 instead of uart2, or other?because Serial.getKey doesen 't tels me to what uart to send...

regards and thanks for the help Wink

tux


RE: Problems loading a zigbee example in pinguino micro - regis - 20-05-2013

Serial.getKey() is the same as Serial1.getKey().
Those functions take no argument, that's why you got this error.
You can also use Serial1.getKey() or Serial2.getKey(), etc .... to scan UART1 or UART2, etc ...
or SerialP32MX.getKey(UART1) or SerialP32MX.getKey(UART2) ...