By: Aiswarya Sudheer, Hugo Fan, Omar El Herraoui and Shamma Younus
Part I: First
This code allows the M5 Atom to behave as a bike light. The bike light has multiple modes, allowing it to act as a front (white) or rear (red) light. Each light can behave in two modes, either a manual strobing mode or a braking mode where the light will project solidly when the atom senses a deceleration. As well as these modes, the bike light also has an off mode. In order to switch between modes, simply press the M5 Atom button.
Part I: Second
This code allows the M5 Atom to behave as temperature sensor. The sensor has 6 modes, the first mode is a display of the current temperature. In order to access this mode, press on the Atom button while the mode number '1' is displayed on the Atom screen. The second mode is a display of the average temperature in the last 24 hours. In order to access this mode, press on the Atom button while the mode number '2' is displayed on the Atom screen. The third mode is a display of the current temperature according to a color scale, with the color scale being displayed alongside the displayed solid color. To access this mode, press on the Atom button while the mode number '3' is displayed on the Atom screen. The fourth mode is a display of a graph of temperature across a predefined range. In order to access this mode, press on the Atom button while the mode number '4' is displayed on the Atom screen. The fifth mode is a display of the current temperature in degrees Fahrenheit. In order to access this mode, press on the Atom button while the mode number '5' is displayed on the Atom screen. In order to switch between these five modes, simply tilt the Atom left or right. The last mode is an off mode that continues to measure the average temperature in the background. This mode is activated by orienting the Atom face down. In order to access the first five modes again, simply orient the Atom face up.
Part II.2: Spinner/Dice
This code allows the M5 Atom to behave as a spinner or a dice, depending on what mode the Atom is in. The Atom opens in the off mode. To activate the next mode, simply press the Atom button. The first active mode is a dice, in order to use it simply spin the Atom, and once the Atom's acceleration has reached 0, a random number will be displayed on the Atom screen. The second active mode is a spinner, it displays a static arrow that will work with the housing to function as a spinner.
Part II.2: WiFi
This code creates a WiFi network that the user can connect to, to open a webpage. The webpage displays two options; one that operates the dice and one that operates the spinner. To activate these options, simply click on the respective option. When the dice button is selected, a random number between 1 and 6 is generated to be displayed on the Atom screen. When the spinner button is selected, an arrow pointing in one of eight direction is randomly generated to be displayed on the Atom screen.