Skip to content

Instantly share code, notes, and snippets.

View bitbank2's full-sized avatar
💭
writing new Arduino libraries

Larry Bank bitbank2

💭
writing new Arduino libraries
View GitHub Profile
@bitbank2
bitbank2 / color_coin_demo.ino
Created March 16, 2021 00:15
Demo sketch for Mike Rankin's ESP32 Color coincell PCB
#include <Adafruit_VL53L0X.h>
#include <bb_spi_lcd.h>
#include <WiFi.h>
#include <Wire.h>
#include <BitBang_I2C.h>
#include <BLEDevice.h>
#include <esp32_gamepad.h>
BLEScan *pBLEScan;
BLEScanResults foundDevices;
//
// Demo sketch to read the data from a RadioLand RDL52832 iBeacon
//
// Displays the data on an M5StickC-Plus without using the M5Stack library
// Also works on the Nano33 BLE
// Parses (in a brute-force way) the large advertisement packet transmitted
// by the iBeacon.
//
// Written by Larry Bank
#include <Wire.h>
#include <bb_spi_lcd.h>
#define WIDTH 240
#define HEIGHT 135
#define TFT_CS 5
#define TFT_RST 18
#define TFT_DC 23
@bitbank2
bitbank2 / pyportal_demo.ino
Created August 24, 2020 22:41
A sketch to demonstrate using my GIF and JPEG libraries together on the Adafruit PyPortal to play either type of file found on the SD Card
// AnimatedGIF + JPEG SDCard example for Adafruit PyPortal
// using SdFat library for card reads and DMA for screen updates
#include <AnimatedGIF.h>
#include <JPEGDEC.h>
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <SdFat.h> // Instead of SD library
@bitbank2
bitbank2 / arduino_perf.ino
Created June 27, 2020 22:49
An example of why it's important to know your target machine when writing software
//
// Arduino Perf
//
// This sketch is to show how much time it takes for the CPU to work
// with different variable types. Knowing that you're running on an
// 8-bit CPU vs a 32-bit CPU can have a huge effect on the performance
// of your code and your design choices. The Cortex-M4F has a hardware
// floating point unit, so integer versus float doesn't make much difference.
// while the AVR has to calculate floating point values using software and
// is much slower at it than integer calculations. It's also clear that the
@bitbank2
bitbank2 / ArduinoMIDI2OPZ.ino
Created June 12, 2020 21:06
Arduino MIDI controller Demo
/* Arduino analog to BLE MIDI
Ubi de Feo @ Bar Arduino
https://www.youtube.com/watch?v=0zNmt_IKwRg
supported boards:
- Arduino MKR WiFi 1010
- Arduino Nano 33 IoT
- Arduino Nano 33 BLE
- Arduino Nano 33 BLE Sense
- Arduino UNO WiFI Rev. 2
**** Sketch for USB MIDI version (Nano 33 BLE not supported) ****