LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Yet another bluetooth PC/NXT

Sorry for delayed reply, I spent weekend outside. Of course I can post my VI. I was thinking it will be difficult to run it, cause my setup is a bit specific, and I don't won't to bother people digging in my dirty patching)

 

I have an arduino with two sensors connected. Arduino speaking via i2c to nxt. I got "0" when no sensors activated, "1" or "4" for left and right sensor and "5" for both sensors activated.  The robot act like it supposed to, except speaking to host. When it's in default "0" state - everything fine. I receive debug state message in mailbox 1 and sound pressure level in mailbox 2 (there is a sound sensor connected to port 2). Since sensor is activated I start receiving "-1" in both mailboxes untill the program return to default "0" case.

 

 

 

Download All
0 Kudos
Message 21 of 23
(2,262 Views)

I've tried to run without case structure and it works absolutely fine. Also it runs ok with default case, I got problems only with other cases.

0 Kudos
Message 22 of 23
(2,258 Views)

Hey,

 

Just to follow up on the original question... You didn't have to go into the Read Message VI and change the value of "Read NXT Outbox". There is already a VI to read the NXT Outbox on the Direct Only palette. Messaging to and from the PC should use Read Mailbox and Write Mailbox on the Direct Only Palette, and the Mail palette is intended to be used between NXTs, but either way should work for EV3 since they don't have an "outbox". I went ahead and made a corrective action request to make the Direct Only mail VIs more discoverable.

 

-Garrett

0 Kudos
Message 23 of 23
(2,198 Views)