Go Down

Topic: Store float, long and string on EEPROM 24LC256 from HC-05 serial bluetooth (Read 1 time) previous topic - next topic

Beur1x

Hi Arduino Forum,

For my project, I need to store sevaral kind of data on 24LC256 EEPROM, nb 2xfloat,1xInteger,1xLong and 1String up to 32 char.

These data are generate from my android device deparate by ";" or "/", and sended via bluetooth HC-05 serial module.
And it can send up to 100 sentences...to store

What i need to know to success?
-EEPROM is divised in 64 bytes pages, each page contain one sentence.
-buffer of EEPROM and HC-05 size?
-baudrate speed ajust?
-some library cut string in char, but it take more longer...

Is my project is makable?  I think yes.

Best regards,
Bertrand

zwieblum

How do want to persuade the HC-05 to communicate with the EEPROM? That thing has a bluetooth chip from the last century on board.

GolamMostafa

Your Android has a BT Interface which will be paired with HC-05. HC-05 will receive data from Android sentence by sentence (1 sentence = 3.14;5.67;0x2345;0x45678ABC;arduino UNO data\n) and then it will pass the data to whom who will perform data write operation with EEPROM? How are you going to mark the end of a sentence (the transmission frame)?

So, what is the problem that you are facing to manage this system?

Beur1x

Hi Zwieblum,

Between the 2 module?
Some wires and an arduino mega,

HC-05, Really from the last century? Am I so old? Do you advice a better bluetooth module?

Best regards
Bertrand

zwieblum

The design of the module is not that old, it's just the bt cipset on it are all "new old stock". When you search russian internet you'll find some interesting insight and custom firmware (and the suggestion to stay away from that suff).
Panasonic bt modules work quite nice, https://at.rs-online.com/web/c/?sra=oss&r=t&searchTerm=bluetooth+panasonic. Or these from ST are nice, too: https://at.rs-online.com/web/c/computertechnik-und-peripheriegerate/funkmodule-und-komponenten/bluetooth-module/?searchTerm=stm%20bluetooth ...

cattledog

I have found that the best library for writing from an Arduino to an external i2c eeprom is Jack Christensen's extEEPROM.h.  It is available through the ide library manager.

This library will handle the different types, and the page boundaries for block writes.

Beur1x

Thanks for your answer,

@GolamMostafa
You're right, Between each sentence there is a s├ęparator "/",
And the problems are :
what are the capacities of each module to treat the data.
Do I need to send up to hundred sentences in one transmission, or one sentence per transmission?
Does the buffer (i don't know how it works) od hc05,mega is larger enough?
Is a library exist to treat each kind of types(thanks Cattledog) and works quick

@Cattledog
Thanks I'll try it soon

@ Zwieblum
HC-05 seems to correspond my needs,
It's easy, ready, I got and I know it, but thanks for your advice, I keep it in mind.

GolamMostafa

1.  You type your sentence elements (say: 3.14;5.67;1234;ABCDEF12;hello Arduino;) in your Arduino's BT screen and click on the send button.

2.  There are 5 elements in the sentence of Step-1. Let us receive the elements of your sentence in MEGA and store them in their respective arrays.
Code: [Select]
do
{
   byte m = Serial1.readBytesUntil(';', myData[i], 32);
   myData[i][m] = '\0';    //null-character
   i++;
}
while( i !=5);


3.  Take the help of this library:  extEEPROM.h and save your data items into external EEPROM.

Nick_Pyner

HC-05, Really from the last century? Am I so old? Do you advice a better bluetooth module?
HC-05 is absolutely fit for the purpose you describe, trawling this forum will show you that it is the most-used by a wide country mile, for good reasons, and its age is irrelevant.

Beur1x

Hi, thanks for your answers

@GolamMostafa,
Thanks for your job, it's really helpfull

@Nick_Piner
thanks for your advice

I'll try soon and I'll let you know how it works

Go Up