LPC810 based node
Windows?
git clone https://github.com/jamescoxon/LPC810.git
cd LPC810
cd src
make
text data bss dec hex filename
3100 21 470 3591 e07 blinky.axf
Generating blinky.hex (FlashMagic, etc.)
Generating blinky.bin
Editing Code
uint8_t num_repeats = '5';
char id[] = "AH1";
char location_string[] = "51.3580,1.0208";
num_repeats will be the maximum number of hops the packet will make, ID is how the station will identify itself and location string will allow it to be placed on the map.
Save the file and then run
make
Uploading/Flashing
./lpc21isp -hex -term ~/Projects/LPC810/src/blinky.hex /dev/tty.usbmodem1421 115200 14746
You'll need to change the paths to both your blinky.hex and usb-serial device
It'll now start waiting for the device on the serial port and you'll need to turn the micro on and off to get it to go into the boatloader and it should then upload the code.
Once uploaded you'll need to detach pin 5 (ISP mode) from ground and then turn the micro on and off again and your code will run.
PCB Guide
To upload to the onboard LPC810 on the PCB you need to ground Pin 5 (they are next to each other on the JP1 header). Connect up Pin 8 and Pin 2 to your rx and tx on your serial port.
Once uploaded remember to detach Pin 5 from Ground to ensure when you reboot the micro it starts running the code.
The current codebase once running uses different pins for its onboard serial port (Pin 8 and Pin 5) as Pin 2 gets used for comms with the radio. To get serial output you'll need to change your connections.
Setting up as a Gateway
Connect your serial ports Tx and Rx to JP1 - 1 and JP1 - 3 (the first and third pin on the JP1 Header)
Gnd and VCC to either 5v or 3.3v depending on your source
Setup your serial port to 9600baud
Currently on boot it'll output 'Done' and then any data it receives.
-
Issues:
May need to switch Rx and Tx around
Check the serial port speed
Ensure that headers and pins are making good contact
Links
Future Plans