Skip to content

Instantly share code, notes, and snippets.

View bboyho's full-sized avatar

Ho Yun "Bobby" bboyho

View GitHub Profile
/******************************************************************************
Digital Indoor Temperature Monitor with the TMP117
Written by: Ho Yun "Bobby" Chan
@ SparkFun Electronics
Updated: Dec 19, 2021
Date: Mar 6, 2020
Description: This sketch configures temperature sensors and prints the
temperature in degrees celsius and fahrenheit to the Qwiic microOLED.
Simply adjust the `output_select` to view the °C, °F, or both. You can
/*
HTU21D Humidity Sensor Example Code
By: Nathan Seidle
SparkFun Electronics
Date: September 15th, 2013
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
Uses the HTU21D library to display the current humidity and temperature
Open serial monitor at 9600 baud to see readings. Errors 998 if not sensor is detected. Error 999 if CRC is bad.
/*
HTU21D Humidity Sensor Example Code
By: Nathan Seidle
SparkFun Electronics
Date: September 15th, 2013
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
Uses the HTU21D library to display the current humidity and temperature
Open serial monitor at 9600 baud to see readings. Errors 998 if not sensor is detected. Error 999 if CRC is bad.
@bboyho
bboyho / SGP40_SHTC3_STC31.ino
Created October 19, 2021 19:18
Combined Sensor Example with SGP40 SHTC3 STC31
/******************************************************************************
WRITTEN BY: Ho Yun "Bobby" Chan
@ SparkFun Electronics
DATE: 10/19/2021
GITHUB REPO: ______________________________
DEVELOPMENT ENVIRONMENT SPECIFICS:
Firmware developed using Arduino IDE v1.8.12
# ========== DESCRIPTION==========
# Example using PIO to drive a set of WS2812 LEDs.
#
# The following code was originally written by
# the Raspberry Pi Foundation. You can find this
# example on GitHub.
#
# https://github.com/raspberrypi/pico-micropython-examples/blob/master/pio/neopixel_ring/neopixel_ring.py
#
# Note that the 'NUM_LEDs' was adjusted to 1. Also
#!/usr/bin/env python3
#-----------------------------------------------------------------------------
# combined1_RGB_SerLCD_ICM20948.py
#
# Combined example to control the RGB LED on the SerLCD
# based on the accelerometer readings on the ICM20948.
#------------------------------------------------------------------------
#
# Written by SparkFun Electronics, March 2020
#
@bboyho
bboyho / 9DOF_ICM_Mod.py
Created December 16, 2020 19:44
Combined Example for the Top pHAT and Qwiic ICM20948 Device. The WS2812 LEDs will change color based on the accelerometer's orientation.
#!/usr/bin/env python3
#
#-----------------------------------------------------------------------------
# 9DOF_ICM_Mod.py
#
# Combined Example for the Top pHAT and Qwiic ICM20948 Device.
# The WS2812 LEDs will change color based on the accelerometer's
# orientation.
#
#------------------------------------------------------------------------
/*
Getting the time and date in your timezone using Ublox commands
Originally Written By: davidallenmann
Modified By: Ho Yun "Bobby" Chan
SparkFun Electronics
Date: April 16th, 2019
License: MIT. See license file for more information but you can
basically do whatever you want with this code.
This is a modified example that shows how to query a Ublox module for the current time and date. We also
/*
Getting the time and date in your timezone using Ublox commands
Originally Written By: davidallenmann
Modified By: Ho Yun "Bobby" Chan
SparkFun Electronics
Date: April 16th, 2019
License: MIT. See license file for more information but you can
basically do whatever you want with this code.
This is a modified example that shows how to query a Ublox module for the current time and date. We also