A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.sparkfun.com/tutorials/micromod-qwiic-pro-kit-project-guide below:

MicroMod Qwiic Pro Kit Project Guide

Introduction

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!

SparkFun MicroMod Qwiic Pro Kit KIT-20407

This kit provides you with a MicroMod Base, two sensors, a joystick, and an OLED screen as well as all the cables you need to…

Retired Suggested Reading

If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview. We recommend reading here for an overview if you decide to take advantage of the Qwiic connector.

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.

Qwiic Joystick Hookup Guide

Looking for an easy way to implement a joystick to your next Arduino or Raspberry Pi project? This hookup guide will walk you through using the Qwiic Joystick with the Arduino IDE on a RedBoard Qwiic and in Python on a Raspberry Pi.

Kit Contents

You will find the following parts in the kit.

Note: Prior to MicroMod Qwiic Pro Kit was the Qwiic Pro Kit. Instead of the RedBoard Turbo with SAMD21 and USB micro-b cable , the MicroMod Qwiic Pro Kit includes the MicroMod SAMD51 Processor Board, Qwiic Carrier Board - Single, USB C Cable, and a MicroMod screwdriver. The Qwiic Triple Axis Accelerometer Breakout - MMA8452Q is also replaced by the 9DoF IMU Breakout - ISM330DHCX, MMC5983MA (Qwiic).

Hardware Hookup

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.

Warning! You will need to connect all of the boards together when using the demo code in this tutorial. Otherwise, you will need to comment out lines of code for the Qwiic board that is not connected to the daisy chain.

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.

Note:

The code used in this tutorial is also compatible with Atmega328P-based Arduinos like the RedBoard Qwiic! If you purchased the components separately or Qwiic Ideation Kit, the setup is the same. Instead of the MicroMod SAMD51 Processor Board, you would be using the RedBoard Qwiic. Check the

note below for more information

when compiling for the Atmega328P-based microcontrollers! You can also swap out different MicroMod Processor Boards with Arduino Cores as well!

SparkFun RedBoard Qwiic DEV-15123

The SparkFun RedBoard Qwiic is an Arduino-compatible development board with a built in Qwiic connector, eliminating the need …

Installing the Board Add-Ons and Drivers Note:

This code/library has been written and tested on Arduino IDE version v1.8.12. Otherwise, make sure you are using the latest stable version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on

installing the Arduino IDE.

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.

Drivers

Heads up! Please be aware that the MicroMod SAMD51 Processor Board is NOT currently supported on Windows 8 due to a lack of support drivers for those specific OS's.

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 Note:

If you have not previously installed an Arduino library, please check out our

installation guide.

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.

If you prefer downloading the libraries manually, you can grab them from each of the respective GitHub repositories.

Note: The demo code currently just uses the accelerometer to control the paddle. We have linked the library in this section in case you use the magnetometer in case you decide to use it as well!

Example Code

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!

Heads up! As with any distance sensor, there is a minimum distance at which the sensor can detect an object accurately. If your hand or finger is too close to the sensor, the readings for the distance can jump to a higher value causing the paddle to move off the screen. Make sure to be within the range to successfully hit the ball or try adjusting the code to include a minimum and maximum range for the paddle.

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!

Troubleshooting Not working as expected and need help?

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:

Need some inspiration for your next project? Check out some of these related tutorials:

AS726X NIR/VIS Spectral Sensor Hookup Guide

It's now easier than ever to measure and characterize how different materials absorb and reflect different wavelengths of light. The AS726X spectral sensors allow you to detect wavelengths in the visible range (VIS) and near infrared range (NIR)!

SparkFun Qwiic Button Hookup Guide

A Hookup Guide for the SparkFun Qwiic Button (Red) and SparkFun Qwiic Button Breakout. Goes over connecting the Qwiic Button to an Arduino microcontroller and using it with the Qwiic Button Arduino library.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4