Skip to content

Instantly share code, notes, and snippets.

View makersenses's full-sized avatar

makersenses makersenses

View GitHub Profile
@makersenses
makersenses / 15.esp32_motor_pwm.ino
Created April 26, 2021 15:32
15.esp32_motor_pwm
const int motor_AL = 4;
const int motor_AR = 5;
// setting PWM properties
const int freq = 5000;
const int ledChannel = 0;
const int resolution = 8;
void setup(){
// configure LED PWM functionalitites
@makersenses
makersenses / 14.esp32_motor.ino
Created April 26, 2021 15:32
14.esp32_motor
const int motor_AL = 4;
const int motor_AR = 5;
void setup() {
pinMode(motor_AL, OUTPUT);
pinMode(motor_AR, OUTPUT);
}
void loop() {
// Left
@makersenses
makersenses / 13.wifi_esp32_gps.ino
Created April 26, 2021 14:39
13.wifi_esp32_gps
#include <TinyGPS++.h>
#define gpsSerial Serial1
#define TX_PIN 32 // MCU 32 <---> Rx GPS
#define RX_PIN 34 // MCU 34 <---> Tx GPS
TinyGPSPlus gps;
void setup()
{
Serial.begin(9600);
@makersenses
makersenses / wifi_esp32_SHTC3_conditional_Pump.ino
Created April 25, 2021 16:23
wifi_esp32_SHTC3_conditional_Pump
#include "Senses_wifi_esp32.h"
#include "Adafruit_SHTC3.h"
#define PUMP_PIN 4
int control_port = 1;
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
const char *userid = "your-senses-user-id";
const char *key = "your-device-key";
@makersenses
makersenses / wifi_esp32_MPU6050.ino
Created April 25, 2021 16:18
wifi_esp32_MPU6050
#include "Senses_wifi_esp32.h"
#include "MPU6050.h"
#include <Wire.h>
MPU6050 accelgyro;
Senses_wifi_esp32 myiot;
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
const char *userid = "your-senses-user-id";
@makersenses
makersenses / wifi_esp32_SHTC3_conditional_NeoPixel.ino
Created April 24, 2021 13:53
wifi_esp32_SHTC3_conditional_NeoPixel
#include "Senses_wifi_esp32.h"
#include "Adafruit_SHTC3.h"
#include <Adafruit_NeoPixel.h>
int led_pin = 27;
int numPixels = 1;
int pixelFormat = NEO_GRB + NEO_KHZ800;
Adafruit_NeoPixel *pixels;
int control_port = 1;
@makersenses
makersenses / wifi_esp32_Pushbutton_NeoPixel.ino
Created April 24, 2021 13:46
wifi_esp32_Pushbutton_NeoPixel
#include "Senses_wifi_esp32.h"
#include <Adafruit_NeoPixel.h>
int button_pin = 26;
int led_pin = 27;
int numPixels = 1;
int pixelFormat = NEO_GRB + NEO_KHZ800;
Adafruit_NeoPixel *pixels;
String response = "";
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
@makersenses
makersenses / wifi_esp32_BH1750.ino
Created April 24, 2021 13:38
wifi_esp32_BH1750
#include "Senses_wifi_esp32.h"
#include <BH1750.h>
#include <Wire.h>
BH1750 lightMeter;
Senses_wifi_esp32 myiot;
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
const char *userid = "your-senses-user-id";
@makersenses
makersenses / wifi_esp32_control_NeoPixel.ino
Created April 22, 2021 16:04
wifi_esp32_control_NeoPixel
#include "Senses_wifi_esp32.h"
#include <Adafruit_NeoPixel.h>
int button_pin = 26;
int led_pin = 27;
int numPixels = 1;
int pixelFormat = NEO_GRB + NEO_KHZ800;
Adafruit_NeoPixel *pixels;
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
@makersenses
makersenses / wifi_esp32_SHTC3.ino
Created April 22, 2021 15:32
wifi_esp32_SHTC3
#include "Senses_wifi_esp32.h"
#include "Adafruit_SHTC3.h"
const char *ssid = "your-wifi-network-name";
const char *passw = "your-wifi-password";
const char *userid = "your-senses-user-id";
const char *key = "your-device-key";
String response;
float t, h;