Wednesday, June 20, 2018

The ESP8266 doesn't have EEPROM?

Unlike the Arduino AVR based controllers, the ESP8266 does not have a dedicated EEPROM. We can however use a bit of flash memory as a emulated EEPROM, and we can use the Arduino EEPROM library to do it. Using the Arduino Put and Get code samples as they are doesn't work. However a simple

EEPROM.begin(1024); // both the put and get code

before the

EEPROM.put(address, variable);
or
EEPROM.get(address, variable);


and a

EEPROM.commit(); // only on the put code

after it makes everything work.

In the linked code samples below, I'm saving 2 strings of text (wifi ssid and password) to the EEPROM in the put code, and retrieving them in the get code. If you put a slide switch in your project, and run the two pieces of code depending on the switch position, you can reset the credentials from a built in web form. I will cover that ability soon.

ESP8266 EEPROM "PUT"

ESP8266 EEPROM "GET"

Fore more info, see:
http://esp8266.github.io/Arduino/versions/2.0.0/doc/libraries.html#eeprom

https://www.baldengineer.com/arduino-eeprom-stores-any-datatype.html

APRS Transmitter

The HX1 is a low-power amateur radio transmitter set to a fixed frequency of 144.390 MHz. In North America, this frequency is used for the Automatic Packet Reporting System, or APRS

APRS is a standard used by amateur-radio operators to broadcast live sensor data on a shared frequency. This data can be received by anyone with the proper equipment, and is aggregated on the internet through gateways run by members of the APRS community. APRS is commonly used to share real-time data including vehicle location (GPS), weather stations, high-altitude balloon tracking, remote sensor platforms, disaster relief coordination, and more. It’s effectively an open-source, open-data, community-run, free to use, IoT system with potentially worldwide coverage.

The HX1 is a 5V, low-power (300mW), narrowband (3kHz) VHF FM transmitter module. With a simple antenna, the range will be around 6 miles. Since this is a “bare” transmitter, the data input must be properly modulated and formatted. There are several Arduino software packages that can do this, see the hookup guide for information.

Note: Because it uses amateur radio frequencies, you will need an amateur radio license to use the HX1. It’s easy (and fun!) to get one.

Related Posts Plugin for WordPress, Blogger...