Found 381 Articles for Hardware

Arduino – base64 encode and decode

Yash Sanghvi
Updated on 26-Jul-2021 10:09:45

5K+ Views

Arduino contains a library that helps with base64 encode and decode. You can download it from the Library Manager. Search for base64, and install the library by Densaugeo.Now, open a new sketch and run the following sample code −#include "base64.hpp" unsigned char normal_text[20] = "Hello World"; unsigned char base64_text[20]; unsigned char decoded_text[20]; void setup() {    // put your setup code here, to run once:    Serial.begin(9600);    Serial.println();    int base64_length = encode_base64(normal_text, 12, base64_text);    Serial.print("Base64 Text: ");Serial.println((char *) base64_text);    Serial.print("Base64 Length: ");Serial.println(base64_length);    int decoded_length = decode_base64(base64_text, decoded_text);    Serial.print("Decoded Text: ");Serial.println((char ... Read More

How to get data of any size from the EEPROM with Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 10:03:34

637 Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.In this article, we will see how to get data of any size (not just a byte) from the EEPROM. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from − File → Examples → EEPROM.ExampleWe will look at the eeprom_get example. This example assumes that ... Read More

How to put data of any size in the EEPROM using Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 09:56:42

1K+ Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.In this article, we will see how to put data of any size (not just a byte) in the EEPROM. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from: File → Examples → EEPROM.ExampleWe will look at the eeprom_put example. The main function of interest ... Read More

How to update existing data in EEPROM with Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 09:48:09

1K+ Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.In this article, we will see how to update existing data in the EEPROM. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from: File → Examples → EEPROM.ExampleWe will look at the eeprom_update example. You essentially use the EEPROM.update() function. The EEPROM.update() function is different ... Read More

How to clear the EEPROM with Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 09:44:25

9K+ Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.In this article, we will see how to clear the EEPROM, i.e., set all its bytes to 0. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from − File → Examples → EEPROM.ExampleWe will look at the eeprom_clear example. It is very easy. You essentially ... Read More

How to write data into EEPROM with Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 09:40:24

1K+ Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.ExampleWe will see how to write data to the EEPROM in this example. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from − File → Examples → EEPROM.We will look at the eeprom_write example. It is quite straightforward, thanks to the EEPROM library. A word ... Read More

How to read data from EEPROM in Arduino?

Yash Sanghvi
Updated on 26-Jul-2021 09:37:07

2K+ Views

Arduino Uno has 1 kB of EEPROM storage. EEPROM is a type of non-volatile memory, i.e., its contents are preserved even after power-down. Therefore, it can be used to store data that you want to be unchanged across power cycles. Configurations or settings are examples of such data.ExampleWe will see how to read data from EEPROM in this example. We will be walking through an inbuilt example in Arduino. The EEPROM examples can be accessed from − File → Examples → EEPROM.We will look at the eeprom_read example. It is quite straightforward, thanks to the EEPROM library.We begin with the ... Read More

What is Arduino Ticker Library?

Yash Sanghvi
Updated on 26-Jul-2021 09:33:31

3K+ Views

The ticker library in Arduino helps you to perform fixed interval operations. It is a great alternative to using delay() as the interval, since this will provide non-blocking usage. This library doesn't use any hardware timer interrupts. Rather, it works with micros() and millis() to organize your tasks. All you need to provide this library is the name of the function to be called, at what interval, and how many times this should be repeated. The library does the rest.ExampleIn order to install this library, open the Library Manager, and search for 'Ticker'. Install the library by Stefan Staub.Once the ... Read More

Arduino IDE 2.0 – Using the Boards Manager

Yash Sanghvi
Updated on 26-Jul-2021 09:28:26

476 Views

In Arduino IDE 2.0, the boards manager is present in the navigation panel on the left.It can also be accessed using Tools → Board → Boards Manager.If you open the boards manager, you can see that it allows you to download packages or cores, each containing one or more boards. For instance, instead of downloading only Uno, you download the 'Arduino AVR Boards' package, and this includes several other boards (like Mega, Leonardo, etc.) apart from Uno.Search for your board of interest, and click 'Install'The progress can be seen in the 'Output' tab at the bottom.

Installing a new library in Arduino IDE 2.0

Yash Sanghvi
Updated on 26-Jul-2021 09:23:12

555 Views

The process of installing a new library in Arduino 2.0 is quite similar to the older versions of the IDE. While the library manager can be accessed using Tools → Manage Libraries, it is also available in the navigation panel on the left.The process ahead is quite straightforward. Search for the library of your interest, by typing in the search box, locate that library, and click Install!The IDE 2.0 prompts you if the selected library has any dependencies which aren't present, and asks you if you want to install these as well.You can choose the appropriate option, and see the ... Read More

Advertisements