{"id":10075,"date":"2015-04-13T15:19:00","date_gmt":"2015-04-13T05:19:00","guid":{"rendered":"http:\/\/legoeng.local\/?p=10075"},"modified":"2022-08-01T10:28:38","modified_gmt":"2022-08-01T00:28:38","slug":"programming-bluetooth-on-ev3","status":"publish","type":"post","link":"http:\/\/legoeng.local\/programming-bluetooth-on-ev3\/","title":{"rendered":"Programming Bluetooth on EV3"},"content":{"rendered":"

\"IMG_20150228_063709\"<\/a>On 27 February 2015, a small group of EDGErs<\/a> went to LEGOLAND in California for an EV3 Hackathon. This post documents one of the projects that came out of the event.<\/em><\/p>\n

Wireless projects using Bluetooth technology can be loads of fun and very engaging. They can definitely bring a “wow” factor into your lessons, and foster high levels of autonomy and creativity among your students.<\/p>\n

Up until the launch of the EV3, programming with Bluetooth options was new yet fairly straight forward and worked well enough with the NXT and its software. You may have discovered, however, that what once worked with NXT-G no longer works with the EV3 Software. If you’ve had similar Bluetooth experiences on the EV3 then you may find the following information very useful.<\/p>\n

Firstly, this article will assume you already know how to pair two EV3 robots together. One of the differences between Bluetooth on the NXT and the EV3 is that there is less of a concern between which robot is the “Slave” and the “Master”. The EV3 appears quite capable of sending and receiving messages irrespective of which device set up the connection.<\/p>\n

The video below, taken at the February 2015 EV3 Hackathon at LEGOLAND in San Diego, shows an EV3 “vehicle” tracking both sides of a black line and heading towards a “traffic light” assembly controlled by another EV3. The challenge was to have the traffic lights module detect the vehicle through the ultrasonic motion sensor and send a Bluetooth message telling it to stop. Then after a few seconds instruct the traffic lights to change back to green and allow the vehicle to proceed along its black path.<\/p>\n

However, the video shows the EV3 vehicle and traffic lights behaving incorrectly. What we discovered was that if the vehicle was waiting for a correct message to change its behaviour (using a ‘Switch’ block), once it was received, the switch would stay “on”. This condition didn’t appear to exist with NXT-G programming.<\/p>\n\n\n

\n