Once you've got the IDE installed and libraries in place you can run our test sketch. This will check all the hardware, and display it on the screen, its sort of a universal test because every part is checked. It's also a great reference if you want to know how to read the light sensor or read the buttons.
You can find it as an example in the Adafruit Arcada library (check the previous page for all the libraries you need to install!)
The test code
- Checks the QSPI flash chip initialised correctly, and displays the manufacturer/device ID if so
- Checks if the QPI flash has a filesystem on it (if not, try loading CircuitPython which will create a filesystem). It will print the # of files found in the root directory
- Tests if an accelerometer was found & print out the X, Y, Z gravitational tuple.
- Display the light sensor value, which ranges from 0 (dark) to 1023 (bright)
- Display the detected battery voltage, from ~3.3V to 4.2V (charged). If no battery, this will float around 4.1V and is normal (there's no way to detect a battery is connected)
-
D3/A8
andD4/A9
measure the analog voltages on the 3 pin JST connectors. They'll be floating until some voltage is applied to them, so ~0.4V is normal - Draw a 'virtual' joystick for the thumbstick and 4 buttons on the front of the Gamer, when buttons are pressed
If the PyGamer accelerometer is shaked or tapped, it will play a 'coin' sound from the speaker or headphones if they are plugged in
To test Arcada's callback functionality, we pulse pin #13 red LED so you'll see it ramp up 4 times a second.
Text editor powered by tinymce.