Skip to content

Instantly share code, notes, and snippets.

View bboyho's full-sized avatar

Ho Yun "Bobby" bboyho

View GitHub Profile
/******************************************************************************
Combined Simple Serial and Qwiic Micro OLED Example
Modified By: Ho Yun "Bobby" Chan
SparkFun Electronics
Date: February 10, 2023
License: MIT. See license file for more information but you can
basically do whatever you want with this code.
This is a combined example of Paul Clark's MAX17043 Fuel Guage
simple serial example, Kirk Benell's Qwiic OLED Hello example,
/******************************************************************************
Combined Simple Serial and Qwiic Micro OLED Example
Modified By: Ho Yun "Bobby" Chan
SparkFun Electronics
Date: February 10, 2023
License: MIT. See license file for more information but you can
basically do whatever you want with this code.
This is a combined example of Paul Clark's MAX17043 Fuel Guage
simple serial example and Kirk Benell's Qwiic OLED Hello
/*
Using the SparkFun Qwiic 12 Bit ADC - 4 Channel ADS1015
Combined Example Written By: Bobby Chan
Original Example Written By: Pete Lewis, Original flex-glove library by: Andy England
SparkFun Electronics
Modified Date: 2/1/2023
License: This code is public domain but you can buy me a beer if you use this and we meet someday (Beerware license).
Feel like supporting our work? Please buy a board from SparkFun!
https://www.sparkfun.com/products/15334
/*
Digital Bubble Level
SparkFun Electronics
Modified By: Ho Yun "Bobby" Chan
Modified Date: Oct 21, 2022
Originally Written By: Nathan Seidle
Date: Feb 26, 2021
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
Feel like supporting our work? Buy a board from SparkFun!
/******************************************************************************
WRITTEN BY: Ho Yun "Bobby" Chan
@ SparkFun Electronics
DATE: 12/8/2022
GITHUB REPO: https://github.com/sparkfun/MicroMod_Environmental_Sensor_Function_Board
DEVELOPMENT ENVIRONMENT SPECIFICS:
Firmware developed using Arduino IDE v1.8.19
========== DESCRIPTION==========
int analogPin1 = A1;
#include "AudioCodec.h"
#include "FFT.h"
#define SAMPLERATE 16000
#define SAMPLECOUNT 128
/*
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.
// // CCS811 Address (0x5B = 91)
//
// // HARDWARE_ID register [0x20 = 32], read value [0x81 = 129]
//
// // HARDWARE_VERSION register [0x21 = 33], read value [0x12 = 18]
//
// // CCS811_STATUS register [0x00 = 0]
//
// ////////// read value [17 = 0001 0001]
//
# MyoWare Example analogRead SINGLE
# By: Ho Yun "Bobby" Chan @ SparkFun Electronics
# Date: 3/24/2022
#
# This code was adapted from the Raspberry Pi MicroPython example for the RP2040
# and ported over from Pete Lewis' Arduino example.
#
# This example streams the data from a single MyoWare sensor attached to ADC A0.
# Graphical representation is available using the Thonny IDE v3.3.13 Plotter (View > Plotter).
# Make sure to rename this file as main.py before running the code on your RP2040!
/*
Written by: Ho Yun "Bobby" Chan
Modified: Dec 20, 2021
@ SparkFun Electronics
"Breathing sleep LED, like on a Mac."
Originally Written By: Jeremy Saglimbeni 2011
thecustomgeek.com
Description: This sketch makes the LEDs breath like on a Mac.