Designed to show off some of the sensors and features in your m5stick.
Author: Chris Moraes
Difficulty: 3 of 4 (for some fancy graphing work)
Download: devOps.m5f
Can you recreate parts of this program? Pick one aspect and try and rebuild it. Of particular interest is the use of:
- Using the built-in buzzer (note the coammands on speaker.volume and speaker.beep frequency)
- Uses “interrupt” code loops – when Button A or B are pressed, different things happen
- Accesses the built-in accelerometer: measures acceleration of the unit
Challenge question: The accelerometer can also be used to work out what orientation the stick is in (just like many smartphones know when they are in portrait or landscape mode). Using the data, can you figure out how you would “tell” which orientation the device is in?