1

My project is to receive data from Bluetooth (HC-05) sensor and storing it in the database. I have successfully received data from Bluetooth sensor and stored it in a String variable. Now i have to store this data to the database. I want to use the sensors as standalone (not connecting to the PC - operated on battery). Can I store the data to the database using ESP8266.

askedJan 29, 2020 at 16:38
Sreenu Murugesan's user avatar
0

1 Answer1

1

Since you mention you operate on a battery (standalone), what exactly do you mean by "the database"? Do you have online connectivity? Do you have any peripherals like an sdcard or other storage?

In case you don't have a permanent online connection, you would need to use some writable memory (likeEEPROM) to store your data in someorganized form. Since the ESP8266 doesn't seem to have any EEPROM built in, you would need to use its flash memory, like described inthose answers.

A database could be as simple as afixed length string list (essentially howstring arrays look in memory). For example if the string data you want to save always has 32 bytes, you could just divide your available storage (e.g. 4096 bytes) to have a "database" wich can store 128 entries (4096/32). Your "database entries" will then be addressable in multiples of 32, you would find the 1st entry at byte 0, the 2nd at byte 32 and so on.

Once you are online, you could send the data out for further processing. Getting the datainto a database can be as simple as ahttps request.

answeredJan 29, 2020 at 19:48
scitor's user avatar
2
  • I am not using any memory. I am using Firebase as a database to store data. I have arduino uno, esp8266. I have created the project in firebase and copied the host name, key into the program. But when I try to upload the program to arduino I am receivingNo such file or directory error for the following header files #include<memory> #include<string> #include<functional> #include<vector> #include<utilities>. I am following thislink. How do i solve the issues.CommentedFeb 3, 2020 at 9:31
  • Missing files most probably mean you didn't include a Library in your IDE. Check the comments in the link you've posted, the listed code looks a bit messed up, while not mentioning any#include<string> lines. Did you trythe Examples directly from the firebase repository, or themuch better library (from the linkedelectropeak source article)?CommentedFeb 3, 2020 at 15:46

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.