Skip to content

Instantly share code, notes, and snippets.

Shawn Hymel ShawnHymel

Block or report user

Report or block ShawnHymel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ShawnHymel
ShawnHymel / boards\yas-0_f070cb.json
Last active Sep 4, 2019
%HOMEPATH%\.platformio\
View boards\yas-0_f070cb.json
{
"build": {
"cpu": "cortex-m0",
"extra_flags": "-DSTM32F070xB",
"f_cpu": "48000000L",
"framework_extra_flags": {
"arduino": "-DVECT_TAB_OFFSET=0x2000 -DCUSTOM_STARTUP_FILE"
},
"mcu": "stm32f070cbt6",
"variant": "YAS-0_F070CB"
@ShawnHymel
ShawnHymel / buttonserver.py
Last active Mar 14, 2019
Toggle LED Web Server
View buttonserver.py
import BaseHTTPServer
import SocketServer
import RPi.GPIO as GPIO
# LED pin number (GPIO)
LED = 2
# Port number for our server
PORT = 80
@ShawnHymel
ShawnHymel / weather.py
Created Mar 13, 2019
Firmata Weather Station
View weather.py
import http.client
import time
from pyfirmata import Arduino, util
# Parameters
COM_PORT = 'COM37'
API_KEY = 'BMZ44FSBTE8JANSU'
HOSTNAME = 'api.thingspeak.com'
AREF = 5.0
@ShawnHymel
ShawnHymel / arduino-robot.ino
Created Mar 12, 2019
Workshop - Robotics - Adding Autonomy
View arduino-robot.ino
// Pins
int echoPin = 5;
int trigPin = 6;
int switchPin = 7;
const int BIN1 = 8;
const int BIN2 = 9;
const int PWMB = 10;
const int PWMA = 11;
const int AIN2 = 12;
const int AIN1 = 13;
@ShawnHymel
ShawnHymel / motor-driver-example.ino
Last active Mar 12, 2019
Workshop - Motor Driver
View motor-driver-example.ino
// Pins
int switchPin = 7;
const int BIN1 = 8;
const int BIN2 = 9;
const int PWMB = 10;
const int PWMA = 11;
const int AIN2 = 12;
const int AIN1 = 13;
// Parameters
View esp32_websocket_host.ino
#include <WiFi.h>
#include <SPIFFS.h>
#include <ESPAsyncWebServer.h>
#include <WebSocketsServer.h>
// Constants
const char *ssid = "ESP32-AP";
const char *password = "LetMeInPlz";
const char *msg_toggle_led = "toggleLED";
const char *msg_get_led = "getLEDState";
View Qwiic_Mux_Spectral_Demo.ino
/**
* Qwiic Mux Spectral Demo
* Author: Shawn Hymel (SparkFun Electronics)
* Date: July 18, 2018
*
* Reads from 2 light spectral sensors and shows amount of light
* detected in each channel.
*
* Connect Qwiic Mux and Qwiic OLED to Arduino. Connect Visible
* (AS7262) and NIR (AS7263) Spectral Sensor Qwiic Breakout
View Differential_I2C_Demo.ino
/*
* Differential I2C Demo
* Author: Shawn Hymel (SparkFun Electronics)
* Date: May 24, 2018
*
* Connect Qwiic OLED and Qwiic Environmental sensor to Arduino.
* Demo will read and display temperature and humidity data. Try
* adding 2x Differential I2C boards in between the Arduino and
* Environmental sensor to place the sensor at some distance up to
* 100 feet from the Arduino.
@ShawnHymel
ShawnHymel / GridEYE_LEDs.ino
Created May 2, 2018
Demo of the Grid-EYE IR sensor using an LED array
View GridEYE_LEDs.ino
/**
* GridEye LED Array Demo
* Author: Shawn Hymel (SparkFun Electronics)
* Date: May 1, 2018
*
* Displays a heat map of what the GridEye sees (8x8 pixels).
*
* Required Components
* - Arduino: https://www.sparkfun.com/products/13975
* - Qwiic Shield: https://www.sparkfun.com/products/14352
@ShawnHymel
ShawnHymel / GridEYE_LEDs.ino
Created May 2, 2018
Demo of the Grid-EYE IR sensor using an LED array
View GridEYE_LEDs.ino
/**
* GridEye LED Array Demo
* Author: Shawn Hymel (SparkFun Electronics)
* Date: May 1, 2018
*
* Displays a heat map of what the GridEye sees (8x8 pixels).
*
* Required Components
* - Arduino: https://www.sparkfun.com/products/13975
* - Qwiic Shield: https://www.sparkfun.com/products/14352
You can’t perform that action at this time.