Webbsidan är senast uppdaterad:
Arduino C/C++ kodning
Arduino, ESP32, FreeRTOS C/C++ - kodexempel, funktioner & IDE för kodning
Samlar här lite speciella C/C++ funktioner och kodexempel för kodning / programmering av Arduino Uno och ESP32 i Arduino IDE och i VSCode-PlatformIO.
Jämförelse av prestanda Arduino Uno vs ESP32 | ||||||||
SRAM | Flash | Clock | Cores | bit-depth | EEPROM | RTC-SRAM | WIFI/BLE | |
Arduino Uno1 | 2kB | 32kB | 16MHz | 1st | 8 | 1kB | - | - |
ESP32 Uno2 | 520kB | 4MB | 240MHz4 | 2st | 32 | in Flash3 | 8kB+8kB | X |
ESP32 fördel | 260ggr | 128ggr | 15ggr | 2ggr | 4ggr | +++++ | +++++ | +++++ |
2. ESP32 modules || ESP32 datasheet
3. Save Data to ESP32 Flash Permanently using Preferences Library
4. Can be changed dynamic in code between 10MHz and 240MHz
C++ för Arduino Uno och ESP32 Uno, kodat i Arduino IDE
Pastebin, för att dela kod i sociala media / forum.Arduino Uno såld i över 10 miljoner exemplar
Compatibility of C and C++: The C and C++ programming languages are closely related but have many significant differences.
String class & string array:- Arduino Built-In Examples - Strings
- Initializing a Char*[] string,
char* perc = "%";
char mystr[] = {'h','i',0};
char* myotherstring = "my other string";
char* mythirdstring = "goodbye";
char* myarr[] = {0};
char* myarr[] = {&mystr, myotherstring};
char* myarr[10];
char* myarr[10] = {0};
char* myarr[10] = {&mystr, myotherstring, mythirdstring, 0}; - String.toCharArray(buf, len), len = No. of characters + 1 ('\0')
String myString;
char buf[10];
myString.toCharArray(buf, myString.length() + 1);
Arduino String to char-array, listar även övriga String functions.
How to convert String to char array in C++?: (more efficient?)
int main()
{
string str = "Tutorialspoint";
char buf[str.length() + 1]; // (str.size() ?)
strcpy(buf, str.c_str());
}
- How to convert flash char array to String in Arduino Uno?
One can use a cast to __FlashStringHelper to invoke the right constructor of the String class. It is the constructor which copies the char array from PROGMEM. __FlashStringHelper is intended as return type for the F() macro.
const char charArray[] PROGMEM = "Some text";
void setup() {
Serial.begin(115200);
String s((const __FlashStringHelper*) charArray);
Serial.println(s);
}
void loop() {
}
- Convert character array to string in Arduino:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println();
char buf[10] = "Hello!";
Serial.print("Char array: ");
Serial.println(buf);
String s = String(buf);
Serial.print("String: ");
Serial.println(s);
}
void loop() {
// put your main code here, to run repeatedly:
}
- Arduino String objects
- Tutorialspoint: Arduino - Strings
- C++ for Arduino - 8 tips to use the String class efficiently
C++ for Arduino - What is string interning?, vs F() - Arduino PROGMEM, läsa variable-sträng direkt från flash-minnet.
Store data in flash (program) memory instead of SRAM.
F() macro and PROGMEM
The hidden Arduino Macro F() fixes random lock ups
Do you know Arduino? – PROGMEM demystified, PSTR() / F() - On an ESP32: Is using the F()Macro as pointless as using PROGMEM?
Storing constants in flash on ESP32?:
No other processor uses the proprietary AVR progmem stuff.
In most other processors you don´t have the limitation that the AVR has so you can use const and directly access the data rather the way C/C++ intended rather than have to jump through hoops using progmem and indirect access functions.
All the complexity of using indirect access functions is due to the AVR limitation of not being able to directly access the flash.
ESP32 const char [] // maximum for Flash Memory?
Constant data in flash memory / program space?:
Constant data is stored in flash by default in ESP32, and can be accessed on byte, half-word and word basis. You need to use ´const´ qualifier in your program to mark the data constant. - What is and when to use IRAM_ATTR ?
- How to format strings without the String class efficient, sprintf() / snprintf() / snprintf_P() (typ F()) / PSTR()
With String class:String s = String("weight = ") + String(weight, 4) + String(" kg");
All printf() format strings
C library function - sprintf() format strings
C snprintf() tutorial: explanation and examples - Using PROGMEM with sprintf_P, to use sprintf_P with both format string and arguments stored in PROGMEM in Arduino Uno.
Here´s the correct syntax:
char header_1[] PROGMEM = "Dissolved O2";
Note that the %S has a capital S because header_1 is in PROGMEM.
char buffer[100];
void setup() {
Serial.begin(57600);
sprintf_P(buffer,PSTR( "The column header is %S") ,header_1);
Serial.println(buffer);
}
void loop(){}
- dtostrf(), function to convert a variable of type double into its ASCII representation and store it as a string.
- Operators in C and C++
- Variable Scope in C++
- Arduino Programming Cheat Sheet (pdf)
- Arduino Language Reference
- Arduino Language Reference by type, ArduinoGetStarted
- Tutorialspoint: Arduino Tutorial
- Tutorialspoint: C++
- EEPROM Library
- Default function() arguments C++
Default arguments C++ function() / declaration
void print(int x, int y=4); // forward declaration
void print(int x, int y=4){ // error: redefinition of default argument
std::cout << "x: " << x << '\n';
std::cout << "y: " << y << '\n';
}
- Arduino Tutorial: Avoiding the Overflow Issue When Using millis() and micros()
The millis() number will overflow (go back to zero) after 49 days and 17 hours.
It´s an unsigned long with a maximum value of 4294967295.
int period = 1000;
unsigned long time_now = 0;
void setup() {
}
void loop() {
if(millis() - time_now > period){
time_now = millis();
Your code...;
}
}
- The simplest button debounce solution, in code
How to Implement Hardware Debounce for Switches and Relays When Software Debounce Isn´t Appropriate.
A Guide to Debouncing - Part 2 - Lite länkar hos FrittLiv kring Enkortsdatorer, Arduino & ESP32
- Espressif SoC ESP32 MCU, System on a Chip (SoC)
- 160+ ESP32 Projects, Tutorials and Guides with Arduino IDE, Random Nerd Tutorials
- Getting Current Date and Time with ESP32 using NTP Server-Client and Arduino IDE, with table of the specifiers which can be used to access a particular configuration of the date/time.
- ESP32 NTP Client-Server: Get Date and Time (Arduino Framwork), Random Nerd Tutorials
- ESP32 NTP Time – Setting Up Timezones and Daylight Saving Time, Random Nerd Tutorials
- World timezone Strings for ESP32 NTP Time
- Specifying the Time Zone with TZ, gnu.org
- IANA Time Zone Database
WiFi.begin(ssid, password);
while(WiFi.status() != WL_CONNECTED){
Serial.print(".");
delay(500);
}
configTime(0, 0, "pool.ntp.org"); // is a cluster of timeservers for anyones use
setenv("TZ", "CET-1CEST,M3.5.0,M10.5.0/3", 1); // Stockholm timezone String
tzset(); // N.B. setenv() & tzset() must be set after each watchdog timer reboot
WiFi.disconnect(true);
WiFi.mode(WIFI_OFF);
- void sntp_set_sync_mode(sntp_sync_mode_t sync_mode), Espressif Set the sync mode.
- Espressif RTC System Time API Reference
- C++ localtime()
- avr-libc - Standard C library for AVR-GCC
- Save Data to ESP32 Flash Permanently using Preferences Library, ersätter Arduino Uno EEPROM och är effektivare samt behåller värdena även efter uppladdad ny kod till ESP32.
- How to use FreeRTOS with Arduino – Real-time operating system, Microcontrollerslab
This is a getting started tutorial on FreeRTOS using Arduino. To demonstrate examples and use of various features of the FreeRTOS operating system, we will use Arduino Uno board and Arduino IDE for writing programs. But you can also use other development boards such as ESP32 and ESP8266. - FreeRTOS - What is An RTOS?
- What and How of FreeRTOS architecture, The Architecture of Open Source Applications
- FreeRTOS Core Libraries - coreMQTT
- Espressif Arduino-ESP32 releases
- Espressif Arduino-ESP32 2.0.1 fick bl.a. Thread-Safe I2C based on ESP-IDF API
- Espressif ESP32 News
- ESP32 Arduino Core´s documentation
- FreeRTOS Documentation:
Mastering the FreeRTOS Real Time Kernel - a Hands On Tutorial Guide
FreeRTOS V10.0.0 Reference Manual - Espressif ESP32 FreeRTOS, Espressif
This section contains documentation of FreeRTOS types, functions, and macros. It is automatically generated from FreeRTOS header files. - Multitasking on ESP32 with Arduino and FreeRTOS
- ESP32: Tips to increase battery life
- ESP32 Dual Core with FreeRTOS and Arduino IDE
- ESP32 Arduino: Creating a FreeRTOS task
- ESP32 Arduino: Using FreeRTOS functions
- How to use ESP32 Dual Core with Arduino IDE
- ULP Coprocessor programming, Espressif
- Queue, Mutex & Semaphore Inter-Task Communication
- Inter-task Communication, freertos.org, Queues, Mutexes & Semaphores
- Communication Between RTOS Tasks, Open4Tech
- RTOS: Mutex and Semaphore Basics, Open4Tech - As embedded system designers, it is our job to identify the critical sections of the program and use mutexes to protect them.
- FreeRTOS Queues
- FreeRTOS Binary Semaphore – Examples of Tasks Interrupt Synchronization using Arduino
- ESP32 Arduino: Communication between tasks using FreeRTOS queues
- Mutex vs Semaphore, A Mutex is different than a semaphore as it is a locking mechanism while a semaphore is a signalling mechanism. A binary semaphore can be used as a Mutex but a Mutex can never be used as a semaphore. The Mutex is a locking mechanism that makes sure only one thread (task) can acquire the Mutex at a time and enter the critical section. This thread only releases the Mutex when it exits the critical section.
- FreeRTOS Mutexes [Inter-task communication and synchronisation]
- FreeRTOS: Semaphore / Mutexes API functions
- FreeRTOS Binary Semaphore – Examples of Tasks Interrupt Synchronization using Arduino
- Introduction to RTOS - FreeRTOS Semaphore Example
- Guide to Reduce the ESP32 Power Consumption by 95%
- DFROBOT: FireBeetle ESP32 IoT Microcontroller, 11µA at deep sleep, 2mA light sleep
- Insight Into ESP32 Sleep Modes & Their Power Consumption
- DFROBOT: WiDo - An Arduino Uno Compatible IoT
- FreeRTOS, Kernel Control & Task Control:
- FreeRTOS, Kernel Control
- vTaskDelay(0) vs taskYIELD()
- vTaskDelay(0) vs vTaskDelay(1)
- FreeRTOS, Task Control
- vTaskDelay()
- ESP32: Keep WiFi connection alive with a FreeRTOS task, vTaskDelay()
- vTaskDelayUntil(), freertos.org
- xTaskDelayUntil(), freertos.org
- vTaskDelayUntil(), kubos.com
- vTaskSuspend(), freertos.org
- Use of vTaskSuspend() and vTaskResume() functions
- FreeRTOS, Interrupt & ISR (Interuppt Service Rutine):
- ESP32 Interrupts, Soft & Hard, Arduino, The Engineering Projects
- Timer Interrupts with ESP32 - Precision sampling rate, iotespresso.com
- Volatile - Variable scope qualifiers, Arduino reference
- What is volatile keyword in C++?, Tutorialspoint
- The interrupt service routine (ISR) and volatile variables, TechExplorations
- FreeRTOS Binary Semaphore – Examples of Tasks Interrupt Synchronization using Arduino, Microcontrollerslab
Deferred interrupt processing execution sequence when the deferred handling task has a high priority.
Deferred interrupt processing will typically involve recording the reason for the interrupt and clearing the interrupt within the ISR, but then unblocking an RTOS task so the processing necessitated by the interrupt can be performed by the unblocked task, rather than within the ISR.
If the task to which interrupt processing is deferred is assigned a high enough priority then the ISR will return directly to the unblocked task (the interrupt will interrupt one task, but then return to a different task), resulting in all the processing necessitated by the interrupt being performed contiguously in time (without a gap), just as if all the processing had been performed in the ISR itself. - FreeRTOS Queues, freertos.org
Queues are the primary form of intertask communications. They can be used to send messages between tasks, and between interrupts and tasks. In most cases they are used as thread safe FIFO (First In First Out) buffers with new data being sent to the back of the queue, although data can also be sent to the front.
Deferred interrupts processing II: In your abstraction layer for the esp32 you can create a task that waits on some queue. In the interrupt routine [ISR] only post to the queue and return. The task you created then will wake up and call the callback. källa - Espressif FreeRTOS Queue API, how to use in an interrupt service routine ISR
- FreeRTOS Interrupt Management Examples with Arduino, Microcontrollerslab
FreeRTOS interrupt provides an interrupt safe version of queue API to read and write data from queues using ISR. These are the two API functions: xQueueSendToBackFromISR(), xQueueReceiveFromISR(). - ESP32 Interrupt Latency Measurement, is roughly 1.8µs with the CPU running @ 240MHz.
- ESP32 High Resolution Timer, int64_t esp_timer_get_time() returns 64-bit time since startup, in microseconds (µs). int64 = 292,5 years before overflow at µs resolution! The millis() overlows after 49,7days!
Unlike gettimeofday function, values returned by esp_timer_get_time() start from zero after startup or the chip wakes up from deep sleep and do not have timezone or DST adjustments applied.
The millis() can be called in an ISR but it doesn´t increment inside it but gives the time for the interrupt. The esp_timer_get_time() can also be called in an ISR, and do probably not increment either. - Interrupt allocation, Care should be taken when allocating an interrupt using a task not pinned to a certain core; while running code not in a critical secion, these tasks can migrate between cores at any moment, possibly making an interrupt operation fail because of the reasons mentioned above. It is advised to always use xTaskCreatePinnedToCore with a specific CoreID argument to create tasks that will handle interrupts.
- Allocating an external interrupt will always allocate it on the core that does the allocation.
- Freeing an external interrupt must always happen on the same core it was allocated on.
- Disabling and enabling external interrupts from another core is allowed.
- ISR can´t be migrated between cores, so they´re defacto ´pinned´ to a core. The core is the one that installs the interrupt.
- Functions called by a Task runs on the same core as the task. - Interrupt allocation, Docs Espressif
The ESP32 has two cores, with 32 interrupts each. Each interrupt has a certain priority level, most (but not all) interrupts are connected to the interrupt mux.
Because there are more interrupt sources than interrupts, sometimes it makes sense to share an interrupt in multiple drivers.
Multicore issues - IRAM-Safe Interrupt Handlers - Multiple Handlers Sharing A Source - ESP32 Arduino: Timer interrupts, techtutorialsx
- ESP32 Arduino: External interrupts, techtutorials
- Introduction to RTOS - Solution to Part 9 (Hardware Interrupts), Digi-Key
- FreeRTOS Software Timer API Functions
- FreeRTOS: Using Software Timers, Open4Tech
- RTOS Task Notifications, FreeRTOS
- FreeRTOS Binary Semaphores [Inter-task communication and synchronisation], freertos.org
Binary semaphores and mutexes are very similar but have some subtle differences: Mutexes include a priority inheritance mechanism, binary semaphores do not. This makes binary semaphores the better choice for implementing synchronisation (between tasks or between tasks and an interrupt), and mutexes the better choice for implementing simple mutual exclusion. - FreeRTOS Mutexes [Inter-task communication and synchronisation], freertos.org
- ESP32 Arduino: Getting DHT22 sensor measurements with interrupts, techtutorialsx
In terms of implementation, our code will periodically read measurements from the DHT22 sensor. Nonetheless, instead of relying on polling or Arduino delays, we will use the timer interrupts to implement the periodicity of the measurements. - Mutual exclusion between task and interrupt, freertos.org
- What is and when to use IRAM_ATTR? (ISR), Espressif ESP32
- Configuring & Handling ESP32 GPIO Interrupts In Arduino IDE, LastMinuteEngineers
- FunctionalInterrupt.ino - example C++ class, Espressif Arduino ESP32
- Watchdog Timer (WDT), FreeRTOS ESP32: 2022-06-27
- Watchdog Timers, Espressif ESP32 datasheet
- Watchdog Timers (WDT), ESP32 technical reference manual
- RTOS, Finite State Machine & OOP coding:
- State Machines Part-1: What is a state machine?
- State Machines Part-2: Guard conditions
- State Machines Part-3: Input-Driven State Machines
- State Machines Part-4: State Tables and Entry/Exit Actions
- State Machines Part-5: Optimal Implementation in C
- State Machines Part-6: What is a Hierarchical State Machine?
- Beyond the RTOS - Part 1: Concurrency & "spaghetti" as main challenges of professional developers
- Beyond the RTOS - Part 2: Best practices of concurrent programming and Active Object pattern
- Beyond the RTOS - Part 3: Active Objects implemented on top of FreeRTOS
- Beyond the RTOS Part-4: state machines as "spaghetti" reducers
- RTOS Part-1: What is a Real-Time Operating System?
- Event-Driven Programming Part-1: GUI example, events, event-loop, run-to-completion, no-blocking
- OOP Part-1: Encapsulation (classes) in C and C++
- OOP Part-2: Inheritance in C and C++
- OOP Part-3: Principles - Inheritance, Polymorphism, Encapsulation, Abstraction
- OOP Part-4: Access Control, In-built Packages, Object Class
- OOP Part-5: Abstract Classes, Interfaces, Annotations
- Hierarchical State Machines
- About QM™ - Model-Based Design tool
- PWM, LEDC & Motor Control Pulse Width Modulator (MCPWM), ESP32:
- LED Control (LEDC), Espressif
- ESP32 LEDC Output, ESPHome
- LED Control (LEDC), Arduino-ESP32
- ESP32-IDF — LEDC Get Started
- LEDC, Supported Range of Frequency and Duty Resolutions, Espressif
- LEDC, Timer Configuration, Espressif
- LED PWM Controller (LEDC), Espressif ESP32 technical reference manual
- LED PWM, 80MHz/8MHz oscillator clock & bits accuracy, Espressif ESP32 datasheet
- Change PWM Frequency on-the-fly, Espressif
- Change PWM Duty Cycle using Hardware - fade, Espressif
- Change PWM Duty Cycle Using Software, Espressif
- Change LEDC frequency and pwm on the fly without glitches, ESP32.com
- Motor Control Pulse Width Modulator (MCPWM), Espressif
-
ESP32 LEDC Output:
Frequency1
PWM Bit depth
Available steps for transitions (2Bit)
≤1220Hz
16
65536
≤2441Hz
15
32768
≤4882Hz
14
16384
≤9765Hz
13
8192
≤19531Hz
12
4096
≤39062Hz
11
2048
≤78125Hz
10
1024
≤156250Hz
9
512
≤312500Hz
8
256
- The ESP32 PWM hardware has 16 different channels, not pins. You can assign any of these channels to any GPIO pin that you want. But it has to have an output driver or in other words, it should be capable of operating as an output pin.
The ESP32 PWM controller has 8 high-speed channels and 8 low-speed channels, which gives us a total of 16 channels. They´re divided into two groups depending on the speed. For each group, there are 4 timers / 8 channels. This means every two channels share the same timer. Therefore, we can´t independently control the PWM frequency of each couple of channels.
So this means we´ve got 16 channels that we can control their PWM duty cycle independently. But the frequency has to be shared between each couple of channels routed to the same timer. ESP32 PWM Tutorial & Examples
- ESP32 Change CPU Speed / clock frequency: 2022-06-27
- My be fixed frequency intervalls, 240, 160, 80, 40, 20 & 10MHz för ESP32 with 40MHz XTAL crystal frequency, getXtalFrequencyMhz() / getCpuFrequencyMhz() / setCpuFrequencyMhz(10) / getApbFrequency(): ESP32 Change CPU Speed (in Arduino).
N.B. 40MHz, 20MHz & 10MHz only usable in case you are not using Wi-Fi or Bluetooth?!
"The only preferable values entered are 240, 160, and 80MHz, but you can also use lesser values, i.e., 40, 20 and 10MHz, in case you are not using Wi-Fi or Bluetooth."
The normally 80MHz ApbFrequency is also changed with CPU-frequency as it goes <80MHz - does it influence the PWM bit depth vs max frequency above?
- My be fixed frequency intervalls, 240, 160, 80, 40, 20 & 10MHz för ESP32 with 40MHz XTAL crystal frequency, getXtalFrequencyMhz() / getCpuFrequencyMhz() / setCpuFrequencyMhz(10) / getApbFrequency(): ESP32 Change CPU Speed (in Arduino).
- OTA (Over-The-Air) code update ESP32:
- Over-the-Air (OTA) Programming on ESP32 Using Arduino
- Espressif: OTA Web Update
- ESP32 OTA (Over-the-Air) Updates – AsyncElegantOTA using Arduino
- ESP32 Basic Over The Air (OTA), Arduino IDE
- ESP32 Over-the-air (OTA) Programming – Web Updater Arduino
- Librarie: esp32FOTA
- GitHub: esp32FOTA library for Arduino, https support
- TinyML ESP32 Arduino, TensorFlow:
- TinyML.org
- TinyML unlocks new possibilities for sustainable development technologies
- TinyML is bringing deep learning models to microcontrollers
- Edge AI Anomaly Detection Part 4: Deploy TinyML Model in Arduino to ESP32 | Digi-Key
- TensorFlow Lite for Microcontrollers
- Announcing TensorFlow Lite Micro support on the ESP32
- Easy Tensorflow TinyML on ESP32 and Arduino
- TensorFlow, Meet The ESP32, Setting up TensorFlow Lite for PlatformIO Deployment
- How to set up a TensorFlow Lite environment for the ESP32, Adafruit blog
- TinyML Book, TinyML Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers - hos Amazon.se
- Webpage, wifi & Bluetooth:
- Communicating with Bluetooth devices over JavaScript, The Web Bluetooth API allows websites to communicate with Bluetooth devices (as ESP32).
- The Web Bluetooth Security Model
- Övrigt:
- Formelsamling, Formler som är bra att ha.
- List of 4000 Series IC, med länk till detaljerad info för varje
- Electrical Symbols & Electronic Symbols
- Fan Affinity Laws of centrifugal fans
-
PlatformIO IDE i VSCode för Arduino och ESP32 kodning / utveckling:
- PlatformIO, 800+ Boards, 35+ Development Platforms, 20+ Frameworks, C/C++
- PlatformIO IDE for VSCode, beskriver installation & grundläggande användning
Quick Start: This tutorial introduces you to the basics of PlatformIO IDE workflow and a general understanding of how to work with projects in the IDE. - VSCode, Visual Studio Code
- PlatformIO IDE for VSCode tillägg / extension
- C/C++ IntelliSense, debugging, and code browsing tillägg / extension
- Code Spell Checker tillägg / extension
- Prettier - Code formatter tillägg / extension
- SerialPlot - Realtime Plotting Software
- platformio/framework-arduinoespressif32 - latest version
- github.com/espressif/arduino-esp32/releases/
- GitHub: espressif/arduino-esp32
- platformio/espressif32 - latest version
- GitHub: platformio/platform-espressif32
- GitHub: platformio/platform-espressif32 - releases
- Espressif 32: development platform for PlatformIO
- PlatformIO: Atmel AVR Development Platform
- PlatformIO: platformio/atmelavr
- GitHub: platformio/platform-atmelavr
- PlatformIO Core 6.0, PlatformIO Labs
- Package Management CLI - pio pkg, PlatformIO
- pio pkg update command in terminal, PlatformIO
- PlatformIO: Get started with ESP-IDF: debugging, unit testing, project analysis
- PlatformIO: Espressif IoT Development Framework (ESP-IDF)
- Espressif: Getting Started with ESP-IDF
- Espressif Systems (ESP32) and PlatformIO Labs joins a partnership in a wide-ranging collaboration on providing a next-generation development ecosystem for IoT solutions.
PlatformIO is the most loved IDE solution for Microsoft Visual Studio Code (VSCode) and the most reviewed extension in the whole Microsoft Marketplace.
PlatformIO IDE is a professional development environment for Embedded, IoT, Arduino, ESP-IDF, FreeRTOS, ARM, AVR, Espressif (ESP8266 / ESP32), and others.
Espressif Systems has been driving the IoT industry by providing highly sophisticated wireless SoC designs optimized for high-end IoT applications, as a truly innovative company. Espressif not only designs powerful AIoT (Artificial Intelligence of Things) chips, but also designs their operating systems and application frameworks. - Ivan Kravets, CEO at PlatformIO Labs: What a moment!, About the partnership PlatformIO-Espressif.
- PlatformIO Labs , Linkedin, with Updates, like blog posts
- Espressif ESP-IDF, VSCode:
- Signal K, marine data exchange:
Signal K is a modern and open data format for marine use. Built on standard web technologies including JSON, WebSockets and HTTP, Signal K provides a method for sharing information in a way that is friendly to WiFi, cellphones, tablets and the Internet.
Kan det kanske även vara något inom off-grid solcellssystem?- Signal K, signalk.org hemsida
- Signal K: SensESP Home, sensor development toolkit for the ESP32 platform.
- GitHub: SensESP, a Signal K sensor development toolkit for the ESP32 platform.
- Signal K, SensESP 1.0.0
- Sailor Hat with ESP32 (SH-ESP32), sensor development board
- DIY sensors with Signal K
- DIY Sensors with Signal K Part 2 - The Hardware
- DIY Sensors with Signal K Part 3 - The Software
- Signal K: How to include anything in Grafana
- GitHub: Signal K Mobile
- SignalK Monitor app
Gjorde några precision strömmätningar för Arduino Uno R3 och ESP32 UNO D1 R32 med exakt samma sketch kompilerad i båda och med samma Olimex Shield-LCD 16x2 på båda.
Med släckt bakgrundsbelysning blev det då:
- Arduino Uno R3 16MHz: 57mA
- ESP32 UNO D1 R32 240MHz: 50mA
- ESP32 UNO D1 R32 10MHz: 20mA
Och med tänd bakgrundsbelysning 33% intensitet +8mA mer.
Strömmatade via USB under mätningarna.
Så trots så extremt mycket mer prestanda är ESP32 strömsnålare, samt har flexibiliteten att man kan anpassa dess klockfrekvens dynamiskt i drift till ens behov för att kunna få strömsnålare drift när det passar.