I wish


Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 03:40pm 08 Oct 2024      

Matherp have you seen this?Have you seen this?
  Quote  ESP32: a look at the built-in BASIC interpreter
n this article, however, we will explore a somewhat hidden and little-known functionality of the ESP32 module: the ROM-based BASIC interpreter

the ROM console is based on the TinyBasic Plus tool developed by Mike Field and Scott Lawrence. With the help command, we get a list of the available commands.
people who have already used BASIC on other hardware platforms will immediately feel at ease.
As for me, I found the commands that allow you to configure the direction and status of GPIOs very useful.

The first way for configuring I/O signals is based on the memory read and write functions, PEEK and POKE, respectively. This is a very low level mode and requires in-depth knowledge of the ESP32 module, which can also be found by consulting the component datasheet. The following example reads the contents of address 0x3FF44004 (register GPIO_OUT_REG), put it in OR with 0x04 (binary 100) and finally writes the value at the same address. This corresponds to setting GPIO2 high:

Could this make a port hypothetically possible?