Post a new topicPost a reply Page 1 of 1   [ 7 posts ]
Author Message
 Post subject: Parking board
PostPosted: Fri Feb 17, 2012 10:02 am 

Joined: Mon Jan 30, 2012 3:06 pm
Posts: 11
Hello,

I just downloaded the new IDE for Windows which seems to have resolved the eeprom issues. However, when I upload a very simple code on the waspmote, it is not executed when the Smart Parking board is placed on the waspmote.

Without the board, the code runs fine and the serial monitor outputs the simple hello message. When the parking board is placed on the waspmote, the code does not seem to even enter the setup() function.

I am quoting the code below. Please note that I have followed the correct procedure for uploading the program (removed all modules), and turned the mote off when adding/removing modules (such as parking board, xbee, etc).


Quote:
void setup()
{
  // Opening UART to show messages using 'Serial Monitor'
  USB.begin();
  SensorParking.loadReference();
  USB.println("2");
  SensorParking.setBoardMode(SENS_ON);
}

void loop()
{
  // Blinking LEDs
  Utils.blinkLEDs(1000);
  // Printing a message, remember to open 'Serial Monitor' to be able to see this message
  USB.println("Hello World, this is Waspmote!");
  // A little delay
  delay(2000);
}




Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Fri Feb 17, 2012 10:06 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7818
Hi charalambos,

Could you try to figure out at which point is your code getting stall?

You should add a small delay (about 50ms) after the USB.begin instruction.

Regards.


Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Fri Feb 17, 2012 10:30 am 

Joined: Mon Jan 30, 2012 3:06 pm
Posts: 11
I initially tried the sample code for the parking board that you guys provide in the guide as well as in the forum, and with some USB.print instructions I realized that the code entered the setup() function, but never exited it so that it could move on to the loop().

So I tried the test code with a couple of setup instructions for the parking board to see if there is an issue with one of the commands. The code runs ok and the serial monitor displays the number "2" and the hello message only when the parking board is NOT on the waspmote.

Instead, what I see on the monitor is the number "2" which keeps being outputted repeatedly as if the setup() function keeps looping.

I tried the small delay but nothing changed.

UPDATE:
I commented the following command:
Quote:
SensorParking.setBoardMode(SENS_ON);

and the code runs OK with the parking board on the waspmote. So it appears to be an issue with setBoardMode. Why is that?


Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Fri Feb 17, 2012 1:38 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7818
Hi charalambos,

Was the battery fully charged when you performed your tests?

Please, follow the instructions in this checklist so we can figure out where is the problem (software, Waspmote, Parking board...).

Regards.


Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Fri Feb 17, 2012 2:26 pm 

Joined: Mon Jan 30, 2012 3:06 pm
Posts: 11
I had the waspmote connected to the USB.

Yes, all steps were followed correctly. Like I said, the trouble appears when the parking board is on the waspmote.


Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Mon Feb 20, 2012 9:31 am 

Joined: Mon Jan 30, 2012 3:06 pm
Posts: 11
In addition, please note that I have also tried this with the waspmote connected to the USB adapter on the wall outlet and still got the same strange results (so it does not seem to be an issue with the voltage from the USB port on the PC).

Also, sometimes the sketch gets stuck in setup() even if the waspmote has no module on it!


Top
 Profile  
 
 Post subject: Re: Parking board
PostPosted: Mon Feb 20, 2012 10:21 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7818
Hello charalambos,

As far as we know, you have 2 Smart Parking boards, shipped on January 2012, correct? Is the problem present in both of the boards? Please check both Parking Boards in your Waspmotes.

Could you take a photo of the faulty system(s) and show it in the forum? Board on top of Waspmote. You can use Imageshak for example.

You said you had Waspmote connected to the USB. Please notice this is NOT sufficient for operations which need high current peaks. Make sure the battery is always connected and charged. The USB cables can transport a limited level of current; however, battery can supply with high current peaks when Waspmote needs them. USB cable is intended for charging the battery and for uploading code, not for powering Waspmote.

Best regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 7 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use