Product Specs

Figure 3-1: Accelerometer Schematic
Refer to the example project in mc-Studio for proper usage of the accelerometer.
2.7 Button
There is one (1) button available for user input. The button is NO (Normally Open) and the processor
enables an internal pullup so the button is an active low device as shown in Figure 3-6.
Figure 3-6: Button Schematic
Monitoring of this button is built into mc-Studio which is shown in Figure 3-7.
01 Shared Event ButtonChanged()
02 If Button0 = True Then
03
//button
pressed
04 LedGreen = True //turn on green LED if button pressed
05 Else
06
//button
released
07 LedGreen = False //turn off green LED if button released
08
End
If
09 End Event
Figure 3-7: Button mc-Script
©2020 mc-Things Inc. Page | 8