Simple Sketches: Qwiic Proximity Sensor Micro OLED Breakout

Опубликовано: 16 Ноябрь 2020
на канале: SparkFun Electronics
11,131
220

This sketch illuminates the Micro OLED Display whenever the Qwiic Proximity Sensor detects an object is present.
Find the code and parts list in the GitHub repo here:
https://github.com/marcus-stevenson/S...

GITHUB LINK:
https://github.com/marcus-stevenson/S...

GITHUB README:
This sketch illuminates the Micro OLED Display whenever the Qwiic Proximity Sensor detects an object is present.

Parts:
SparkFun Proximity Sensor Breakout - VCNL4040
https://www.sparkfun.com/products/15177

SparkFun Micro OLED Breakout (Qwiic)
https://www.sparkfun.com/products/14532

SparkFun Qwiic Pro Micro - USB-C (ATmega32U4)
https://www.sparkfun.com/products/15795

Qwiic Cable - 200mm
https://www.sparkfun.com/products/14428

Reversible USB A to C Cable - 2m
https://www.sparkfun.com/products/15424

Instructions:

You may need something to support your Qwiic breakout boards as you connect your hardware with Qwiic cables. I hacked together a little prototyping station using an old Arduino and Breadboard Holder from my SIK, some nylon standoff hardware, and some scrap particle board. Another solution is using 3M Dual Lock like Derek Runberg shows here. https://www.sparkfun.com/news/3277
If you haven’t already, solder some breakaway headers onto your Pro Micro so it can be held in place securely by the breadboard, and click it into place.
Secure the SparkFun Proximity Sensor Breakout in place using a nylon mounting standoff.
Secure the Micro OLED Dispay in place using a mounting hole and nylon standoff.
Connect the Micro OLED Display, the Proximity Sensor Breakout, and the Pro Micro via 200 mm Qwiic cables and the Qwiic JST connectors.
Plug in your USB C cable to the Pro Micro and connect it to your computer. Make sure you have the correct port and board selected under the tools menu. Also, make sure to select “ATMEGA 32U4 (5V, 16MHz)” under the “processor” option, or else you will get an upload error. Full setup for the pro micro here. https://learn.sparkfun.com/tutorials/...
Open the ProximityMicroOLEDexample.ino sketch and hit upload.
If the sketch uploads successfully, you should see the Micro OLED Display light up whenever you hold your hand or an object over the Qwiic Proximity Sensor.


Смотрите видео Simple Sketches: Qwiic Proximity Sensor Micro OLED Breakout онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь SparkFun Electronics 16 Ноябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 11,131 раз и оно понравилось 220 людям.