MicroMod Qwiic Pro Kit Project Guide
The MicroMod Qwiic Pro Kit was designed to allow users to get started with Arduino without the need for soldering or a breadboard. We've included three inputs (a joystick, accelerometer, and proximity sensor) and one display that can be daisy chained to your Arduino. Hooking up a handful of inputs and outputs to an Arduino has never been so easy with the MicroMod and Qwiic ecosystems!
|MicroMod Ecosystem||Qwiic Connect System|
We would also recommend taking a look at the following tutorials to set up the RedBoard Turbo and get a feel for each Qwiic component.
MicroMod SAMD51 Processor Board Hookup Guide
October 21, 2020
Qwiic Micro OLED Hookup Guide
Qwiic Joystick Hookup Guide
Qwiic Proximity Sensor (VCNL4040) Hookup Guide
You will find the following parts in the kit.
- 1x MicroMod Qwiic Carrier Board - Single
- 1x MicroMod SAMD51 Processor
- 1x Reversible USB A to USB C Cable - 0.8 Meter
- 1x MicroMod Screwdriver
- Qwiic Cables
If you have not already, make sure to check out the Getting Started with MicroMod: Hardware Hookup for information on inserting your Processor Board to your Carrier Board. The MicroMod Qwiic Carrier Board Hookup Guide also goes over how to connect the boards together as well!
Remove the screw across from the MicroMod Qwiic Carrier Board - Single. Then insert the MicroMod SAMD51 Processor Board into the M.2 socket. The Processor Board will stick up at an angle (at around 25°), as seen here.
Hold the board down and tighten the screw with a Philip's head.
Once connected, your board should be secured to the MicroMod Qwiic Carrier Board - Single like the image shown below.
Insert the Qwiic cable of your choice between each to each of the boards. You can daisy chain the boards any way you like. However, we found it easier to control the 9DoF's accelerometer by having it at the end and connecting a longer Qwiic cable. Depending on the player, you will need to orient the 9DoF's accelerometer with respect to the paddle. The vertical and horizontal Qwiic connectors also connect to the same port so you can connect to either one. We also found it easier to connect the Qwiic Distance Sensor with VCNL4040 to the other end as well. Then connect the USB cable between your computer and MicroMod Qwiic Carrier Board - Single.
Mounting Qwiic Boards to the Standoffs
You can also mount the Qwiic Micro OLED breakout to the end of the two standoffs as shown below. Remove the yellow tape that is covering the mounting holes. Align the mounting hole with the standoffs. Insert a 4-40 screw between the Qwiic Micro OLED's mounting hole and tighten. You'll need to use some elbow grease to drive each 4-40 screw into the standoffs since they are slightly offset. Make sure to be careful with the Qwiic connector that is closest to the mounting holes. The height of the standoffs and the position of the connector can make the connector push against the end of the Qwiic Carrier Board - Single. However, it was enough to hold the display down.
We recommend not mounting the Qwiic Distance Sensor, Qwiic Joystick, and Qwiic 9DoF so that users that are sitting across from each other are able to control their paddle on their side without getting in the way of the display.
Installing the Board Add-Ons and Drivers
There are a few board add-ons to install before you are able to upload code to your MicroMod SAMD51 Processor Board. If you have not already, make sure to check out the MicroMod SAMD51 Processor Board hookup guide to install the SAMD51 and SparkFun board add-ons.
The MicroMod SAMD51 Processor Board is now easier than ever to program, thanks the UF2 bootloader. With this bootloader, the MicroMod SAMD51 Processor Board shows up on your computer as a USB storage device without having to install drivers for Windows 10, Mac, and Linux!
Installing the Libraries
SparkFun has written a library for the Qwiic enabled joystick, 9DoF IMU (ISM330DHCX, MMC5983MA), proximity sensor (VCNL4040), and 64x48 micro OLED. You can obtain these libraries through the Arduino Library Manager. Search for the following terms to automatically install the latest versions of each library. If you have issues compiling, you may need to download the respective library versions listed below.
- SparkFun Joystick (v1.0.4)
- SparkFun 6DoF ISM330DHCX - Accelerometer and Gyro (v1.0.0)
- SparkFun MMC5983MA - Magnetometer (v1.0.0)
- SparkFun VCNL4040 (v1.0.2)
- SparkFun micro OLED (v1.2.5)
If you prefer downloading the libraries manually, you can grab them from each of the respective GitHub repositories.
We recommend grabbing the code from its the GitHub repository. Otherwise, you can download the zipped file from the link below.
After downloading, unzip the files and open the MicroModQwiicStarterExample.ino sketch. It should be located in the downloads folder similar to this path: .../Firmware/Arduino/MicroModQwiicStarterExample/MicroModQwiicStarterExample.ino. Open the code up in the Arduino IDE, select the board (i.e. the SparkFun SAMD51 MicroMod), and the COM port that the board enumerated on. Then hit the upload button.
With a friend, try rocking the 9DoF back and forth along the x-axis or moving your hand above the proximity sensor to control each paddle. You can also take a PCB or flat object as shown in the GIF below to make it easier to control. Remember, you will need to orient the 9DoF's accelerometer with respect to the paddle (if you notice in the GIF, player 1 had the board oriented in a way that had the paddle controls were reversed). You will need to orient the micro OLED so that the paddle is on the side of the player's Qwiic board. The game will continue as long as the ball hits the paddle and bounces to the other side. A player will win a round as soon as the other player fails to bounce the ball back to the other side. The current score will be briefly displayed before the next game. Try to rack up more points than your opponent!
The default code uses the 9DoF's accelerometer as player 1 and the proximity sensor as player 2. Try adjusting the code to use the joystick for one of the players by adding and removing the single line comments. The joystick will control the paddle along the "vertical" y-axis. Each board can only have one player assigned. See if you can try to remove the unused Qwiic board from the daisy chain and commenting out each instance of the related board. Or try adjusting the code to control the paddle with the magnetometer and a magnet!
If you need technical assistance and more information on a product that is not working as you expected, we recommend heading on over to the SparkFun Technical Assistance page for some initial troubleshooting.
If you don't find what you need there, the SparkFun Forums are a great place to find and ask for help. If this is your first visit, you'll need to create a Forum Account to search product forums and post questions.
Resources and Going Further
Now that you've successfully got your MicroMod Qwiic Pro Kit up and running, what will else will you build? For more information, check out the resource below:
- Arduino Libraries
- MicroMod Qwiic Pro Kit Code
Need some inspiration for your next project? Check out some of these related tutorials: