This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First example - extremely simple | |
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip | |
#include <SPI.h> | |
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h | |
unsigned long displayWeightLastTime = 0; | |
unsigned long displayWeightDelay = 1000; | |
unsigned long currentMillis = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example code for 1.28 inch, 240*240 TFT LCD Display which uses the GC9A01 driver. The code rotates a needle | |
around a pivot point (think compass needle). Thanks to "Volos Projects" on YouTube. | |
Original code ref: https://github.com/VolosR/RotateSpritesTutorial/blob/main/RotateSpritesTutorial.ino | |
YouTube ref: https://www.youtube.com/watch?v=oqBa_ptBmLU | |
I adapted the example code for my LCD that is 240x240 and used some variables in the process | |
*/ | |
#include <TFT_eSPI.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit Adafruit example that comes with the Adafruit_GC9A01A.h library. I only wired my board | |
// consistent with the pin definitions in lines 31-35 using a ESP32 with 30 pins (i.e. ESP-WROOM-DA Module) | |
#include "SPI.h" | |
#include "Adafruit_GFX.h" | |
#include "Adafruit_GC9A01A.h" | |
// Define pins for display interface. You'll probably need to edit this for | |
// your own needs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <HardwareSerial.h> | |
#include <WiFi.h> | |
#include <HTTPClient.h> | |
// WiFi credentials | |
const char* ssid = "Pixel_1"; | |
const char* password = "Taco1234"; | |
// Google_Deployment_ID = "AKfycbwZv_vHVI9Hw67vYj609zprKJmdVEuHyH37Mg3VCzo-2lPU9Zaz-dHLp1P7RRAgSDMb" | |
const char* googleURLPrefix = "https://script.google.com/macros/s/AKfycbwZv_vHVI9Hw67vYj609zprKJmdVEuHyH37Mg3VCzo-2lPU9Zaz-dHLp1P7RRAgSDMb/exec"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// below is the code that runs on the ESP32 | |
#include <Wire.h> | |
#include <Adafruit_BMP085.h> | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#include <WiFi.h> | |
#include <HTTPClient.h> | |
#include "DHT.h" | |
#include <Arduino.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# gps_odom.py credit Matt Droter | |
import rospy | |
import tf | |
import math | |
from nav_msgs.msg import Odometry | |
from tf.transformations import euler_from_quaternion, quaternion_from_euler, quaternion_multiply | |
from geometry_msgs.msg import Transform, Quaternion, QuaternionStamped, Pose, Point | |
from sensor_msgs.msg import NavSatFix, NavSatStatus, TimeReference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Calculate the error between current direction and the desired direction | |
* convert the error to a value 0-255 to drive the Cytron motor controller connected to a steering motor. | |
* Ref: https://www.youtube.com/channel/UCjiVhIvGmRZixSzupD0sS9Q | |
* | |
* Thank you Jeff Sampson for guidance and corrections | |
*/ | |
#include <Arduino.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Calculate the error between current direction and the desired direction | |
* Use a MAP function to convert the error to a value 0-255 | |
* Use that value to feed into a PID and use the output as the power level for the motor controller | |
*/ | |
#include <Arduino.h> | |
/* Credit: https://www.youtube.com/channel/UCjiVhIvGmRZixSzupD0sS9Q | |
* | |
* Very hard left - 3492 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This was used to confirm the size of the structure and test using the memcpy function to copy from a structure to a buffer and then back again. | |
* This helped me clarify this concept would work in anticipation of including it in a lora radio master/slave setup. | |
*/ | |
struct RadioControlStruct{ | |
int steering_val; | |
int throttle_val; | |
float press_norm ; | |
float press_hg; | |
float temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Program: ttgo_adafruit_client_v2.ino | |
* a simple messaging client (receiver)with the RH_RF95 class. | |
*/ | |
#include <SPI.h> | |
#include <RH_RF95.h> | |
//Libraries for OLED Display | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> |
NewerOlder