summaryrefslogtreecommitdiff
path: root/source/microcontrollers/olimex-esp32-c3-devkit-lipo/index.rst
blob: 2a6b14cc833380d3b3122e86051f3343366996ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
****************************
 Olimex ESP32-C3-DevKit-Lipo
****************************

Notes on the ESP32-C3-DevKit-Lipo_ boards from Olimex.

.. _ESP32-C3-DevKit-Lipo:
   https://www.olimex.com/Products/IoT/ESP32-C3/ESP32-C3-DevKit-Lipo/open-source-hardware

Arduino
=======

Version 1.8 of Arduino (as installed from debian packages) is ok.

Setup
-----

* Under File → Preferences, add the espressif URL to the Additional
  Boards Manager URLs field. (on 2024-09-04 that's
  ``https://dl.espressif.com/dl/package_esp32_index.json``).
* Under Tools → Board → Boards Manager make sure that you install a
  version of esp32 by Espressif Systems that is above 2.0 (on 2024-09-04
  there is a 3.0.4 that works).

Programming
-----------

These are the settings used:

:Board: ESP32C3 Dev Module
:Upload Speed: 115200
:Flash Frequency: 80MHz
:Partition Scheme: Default
:Core Debug Level: None
:Erase All Flash Before Sketch Upload: Disabled
:USB CDC On Boot: Enabled

It may be necessary to bring GPIO9 to GND to force the board into
bootloader mode before loading sketches.

Battery Measurement
===================

The battery voltage can be read on GPIO3 after closing the jumpers
BAT_PWR_E1 and BAT_SENS_E1 with the following arduino code::

   float battValue = analogReadMilliVolts(3) / 500.0 ;

See also
========

* `The post on my blog with the original version of these instructions
  <https://blog.trueelena.org/blog/2023/04/30-programming_the_ESP32-C3-DevKit-Lipo_with_arduino/index.html>`_
* `Explanation on battery measurements in a GitHub issue
  <https://github.com/OLIMEX/ESP32-C3-DevKit-Lipo/issues/1#issuecomment-1486468781>`_

..
   vim: set filetype=rst: