View unanswered posts | View active topics It is currently Wed Sep 23, 2020 10:59 pm

Reply to topic  [ 1 post ] 
Bluetooth Receiving 
Author Message

Joined: Sat Feb 28, 2015 4:55 pm
Posts: 4
Post Bluetooth Receiving
We have written a program to send a message from one NXT to another to get a sensor value. However, we are running into trouble when trying to get the value back on the first NXT who asked for the value (the other NXT should have received a number "101" to which it should send the value back).
This is the code on that NXT:
task main()
   float barometric;
   float baroMsg = 0.000;
   int Loop = 1;
   while (Loop == 1) {
      baroMsg = message;
      nxtDisplayTextLine(1, "%5.3f baroMsg", baroMsg);
      if (baroMsg > 0.000) {
         barometric = baroMsg;
         nxtDisplayTextLine(2, "%5.3f barometric", barometric);
         Loop = 1;

When we run the two programs, we know that one of the NXTs receives the "101" and checks the sensor value, displaying it on the screen. The other NXT, however, does not seem to be receiving the message sent back with the value.

Thanks for your help,

Mon Jun 01, 2015 8:22 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests

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
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.