This file contains hidden or 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 <Wire.h> | |
| #include <Adafruit_GFX.h> | |
| #include <Adafruit_SSD1306.h> | |
| #include <WiFi.h> | |
| #define SCREEN_WIDTH 128 | |
| #define SCREEN_HEIGHT 64 | |
| Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); | |
| int history[SCREEN_WIDTH]; |
This file contains hidden or 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
| // Required App Version: 0.7.0 | |
| // --------------------------------------------------------------------------- | |
| // This Arduino Nano sketch accompanies the OpenBot Android application. | |
| // | |
| // The sketch has the following functionalities: | |
| // - receive control commands and sensor config from Android application (USB serial) | |
| // - produce low-level controls (PWM) for the vehicle | |
| // - toggle left and right indicator signals | |
| // - wheel odometry based on optical speed sensors | |
| // - estimate battery voltage via voltage divider |
This file contains hidden or 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 "driver/pcnt.h" /* Include the required header file, Its working Arduion IDE 2.0*/ | |
| #include "soc/pcnt_struct.h" //!add | |
| /* For detailed reference please follow the documentations in following Link:- | |
| Link:- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/pcnt.html | |
| */ | |
| #define PCNT_UNIT_UsedA PCNT_UNIT_0 /* Select the Pulse Count 0 as the unit..*/ | |
| #define PCNT_H_LIM_VAL 20000 /* Set the max limit to trigger the interrupt*/ | |
| #define PCNT_INPUT_SIG_IOA 32 /* Pulse Input selected as GPIO 4 */ |
This file contains hidden or 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 "driver/pcnt.h" /* Include the required header file, Its working Arduion IDE 2.0*/ | |
| #include "soc/pcnt_struct.h" //!add | |
| /* For detailed reference please follow the documentations in following Link:- | |
| Link:- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/pcnt.html | |
| */ | |
| #define PCNT_UNIT_UsedA PCNT_UNIT_1 /* Select the Pulse Count 0 as the unit..*/ | |
| #define PCNT_H_LIM_VAL 1 /* Set the max limit to trigger the interrupt*/ |
This file contains hidden or 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
| // BLOG Eletrogate | |
| // ESP32 Frequency Meter | |
| // ESP32 DevKit 38 pins + LCD | |
| // https://blog.eletrogate.com/esp32-frequencimetro-de-precisao | |
| // Rui Viana and Gustavo Murta august/2020 | |
| #include "stdio.h" // Library STDIO | |
| #include "driver/ledc.h" // Library ESP32 LEDC | |
| #include "driver/pcnt.h" // Library ESP32 PCNT | |
| #include "soc/pcnt_struct.h" |
This file contains hidden or 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 "driver/pcnt.h" /* Include the required header file, Its working Arduion IDE 2.0*/ | |
| #include "soc/pcnt_struct.h" //!add | |
| /* For detailed reference please follow the documentations in following Link:- | |
| Link:- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/pcnt.html | |
| */ | |
| #define PCNT_UNIT_UsedA PCNT_UNIT_1 /* Select the Pulse Count 0 as the unit..*/ | |
| #define PCNT_UNIT_UsedB PCNT_UNIT_0 /* Select the Pulse Count 1 as the unit..*/ |
This file contains hidden or 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 "Arduino.h" | |
| #include <driver/pcnt.h> | |
| #define ARDUINO_RUNNING_CORE 1 | |
| void TaskReadPulses(void *pvParameters) // This is a task. | |
| { | |
| (void)pvParameters; | |
| pcnt_config_t pcntCh1 = { |
This file contains hidden or 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 "driver/pcnt.h" | |
| #define PCNT_H_LIM_VAL 10 | |
| #define PCNT_L_LIM_VAL -10 | |
| #define PCNT_THRESH1_VAL 5 | |
| #define PCNT_THRESH0_VAL -5 | |
| #define PCNT_INPUT_SIG_IO 34 // Pulse Input GPIO | |
| #define PCNT_INPUT_CTRL_IO 5 // Control GPIO HIGH=count up, LOW=count down | |
| #define LEDC_OUTPUT_IO 5 // Output GPIO of a sample 1 Hz pulse generator |
This file contains hidden or 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
| //ch32v003_ArduinoTest.ino | |
| #include <Arduino.h> | |
| /* PC1 as blinky LED, change here as needed */ | |
| #define LED1 C1 | |
| #define LED2 C2 | |
| void setup() { | |
| pinMode(LED1, OUTPUT); |
This file contains hidden or 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
| // Arduino_Speed_Tests.ino | |
| // Arduino Speed Test Benchmarking Program | |
| // Original Program Credit: Arduino.cc | |
| // Modified By: Dan Watson | |
| // synchannel.blogspot.com | |
| // 1-29-2015 | |
| // This sketch is the speed test portion of the Arduino Show Info program | |
| // http://playground.arduino.cc/Main/ShowInfo |
NewerOlder