Getting sensor data with Snap (for now)



  • Hi folks! One of the most common questions we get is how users can get sensor data. The best way to do that right now is with Snap using loops. I've provided an example here of how to read gyro and altitude data using loops. Ignore the blocks on the left, those are simply remote control blocks. The blocks outlined in green on the right are active, and they are constantly checking for updates on the data that I've got hooked up to variables in the top right.

    0_1520900834885_reading_sensordata.png

    Give it a try, and then move your drone around to see the value change. The altitude should be effective up to about 2000 mm.

    There's also a lesson right here about reading gyro data.

    Once the library update is released later this week, we'll be releasing lessons about how to read sensor data both in Arduino and Python in the coming weeks.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.