Friday, August 30, 2013

Piece

#Piece is the word I am looking for. 

Tuesday, August 27, 2013

Cannot insert perl array in database

I recently came across a problem where my perl array was generating some random value in MySql query. I finally figured out that, you have to convert perl array to string first and then can insert in the database. Here is how you can do it:

my @arrayData = ("aaa","bbb","ccc");
my $ArrayString = join " ", @arrayData;

use above variable in MySql query.

Cheers. 

Thursday, August 01, 2013

Add variable in TinyOS symbol table


  1. Add uint_8 volatile myVar=255; in Implementation.
  2. In boot method, add myVar+=1;
  3. Use this command to check if symbol is added: tos-set-symbols --read /build/telosb/main.exe
  4. Change value of variable using:tos-set-symbols --objcopy msp430-objcopy --objdump msp430-objdump --target ihex build/telosb/main.ihex build/telosb/main.ihex MoudleName__myVar=30 TOS_NODE_ID=5 ActiveMessageAddressC__addr=5
  5. Run your ihex file.