#Piece is the word I am looking for.
Friday, August 30, 2013
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.
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
- Add uint_8 volatile myVar=255; in Implementation.
- In boot method, add myVar+=1;
- Use this command to check if symbol is added: tos-set-symbols --read /build/telosb/main.exe
- 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
- Run your ihex file.
Subscribe to:
Posts (Atom)