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 <WiFi.h> | |
#define gpio16LEDPin 16 /* One LED connected to GPIO16 - RX2 */ | |
#define gpio17LEDPin 17 /* One LED connected to GPIO17 - TX2 */ | |
const char* ssid = "ESP32-WiFi"; /* Add your router's SSID */ | |
const char* password = "12345678"; /*Add the password */ | |
int gpio16Value; | |
int gpio17Value; |
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
#define ADCPIN A0 | |
const int LEDPin = 16; /* GPIO16 */ | |
uint16_t dutyCycle; | |
const int PWMFreq = 5000; | |
const int PWMChannel = 0; | |
const int PWMResolution = 12; | |
const int MAX_DUTY_CYCLE = (int)(pow(2, PWMResolution) - 1); |
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
#define ADCPIN A0 | |
int adcValue; | |
float voltValue; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ |
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
const int redLEDPin = 16; /* GPIO16 */ | |
const int greenLEDPin = 17; /* GPIO17 */ | |
const int blueLEDPin = 4; /* GPIO4 */ | |
uint16_t redDutyCycle; | |
uint16_t greenDutyCycle; | |
uint16_t blueDutyCycle; | |
const int redPWMFreq = 5000; /* 5 KHz */ | |
const int redPWMChannel = 0; | |
const int redPWMResolution = 12; |
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
const int LEDPin = 16; /* GPIO16 */ | |
int dutyCycle; | |
/* Setting PWM Properties */ | |
const int PWMFreq = 5000; /* 5 KHz */ | |
const int PWMChannel = 0; | |
const int PWMResolution = 10; | |
const int MAX_DUTY_CYCLE = (int)(pow(2, PWMResolution) - 1); | |
void setup() | |
{ |
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
/** | |
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. | |
* | |
* SPDX-License-Identifier: BSD-3-Clause | |
*/ | |
#include "pico/stdlib.h" | |
int main() { | |
const uint LED_PIN = 25; /* On-board LED. Connected to GPIO 25 */ |
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 <SPI.h> | |
#include <MFRC522.h> | |
#include <Servo.h> | |
#include <LiquidCrystal_I2C.h> | |
/*Using Hardware SPI of Arduino */ | |
/*MOSI (11), MISO (12) and SCK (13) are fixed */ | |
/*You can configure SS and RST Pins*/ | |
#define SS_PIN 10 /* Slave Select Pin */ | |
#define RST_PIN 7 /* Reset Pin */ |
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 <SPI.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_PCD8544.h> | |
#define analogPin A0 /* ESP8266 Analog Pin ADC0 = A0 */ | |
/* Declare LCD object for SPI | |
Adafruit_PCD8544(CLK,DIN,D/C,CE,RST);*/ | |
Adafruit_PCD8544 display = Adafruit_PCD8544(14, 13, 5, 15, 4); /*D5, D7, D1, D8, D2 */ | |
int contrastValue = 60; /* Default Contrast Value */ |
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 <SPI.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_PCD8544.h> | |
/* Declare LCD object for SPI | |
Adafruit_PCD8544(CLK,DIN,D/C,CE,RST);*/ | |
Adafruit_PCD8544 display = Adafruit_PCD8544(14, 13, 5, 15, 4); /*D5, D7, D1, D8, D2 */ | |
int contrastValue = 60; /* Default Contrast Value */ | |
void setup() |
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 <SPI.h> | |
#include <MFRC522.h> | |
/*Using Hardware SPI of Arduino */ | |
/*MOSI (11), MISO (12) and SCK (13) are fixed */ | |
/*You can configure SS and RST Pins*/ | |
#define SS_PIN 10 /* Slave Select Pin */ | |
#define RST_PIN 7 /* Reset Pin */ | |
/* Create an instance of MFRC522 */ |