Go Down

Topic: EEprom storing serial input (Read 800 times) previous topic - next topic

Giga_question

Apr 09, 2018, 07:09 pm Last Edit: Apr 10, 2018, 11:03 am by Giga_question
I have a question. I am making a game with another board by BBC, and using Arduino as storage. I want to know how can I Do this. It is transferring info via TX and RX.

THX

PaulS

Quote
It is transferring info via TX and RX.
What is? Transferring data to what?

Serial data consists of bytes. EEPROM stores bytes. What a perfect fit. What IS the problem?
The art of getting good answers lies in asking good questions.

Giga_question

The arduino and BBC micro:bit

ieee488

transferring via RX and TX?

really?

According to it's website, it has Bluetooth BLE and a "radio"
The radio is for communication to another BBC micro:bit.
It does have a USB for downloading programs into the BBC micro:bit and for powering it.

I am not seeing where RX / TX is possible.


Giga_question

#4
Apr 20, 2018, 08:36 am Last Edit: Apr 20, 2018, 08:41 am by Giga_question
You may not see it, but you can set it up.serial.redirect(SerialPin.P0, SerialPin.P1, 9600)

ieee488

#5
Apr 20, 2018, 03:50 pm Last Edit: Apr 20, 2018, 03:51 pm by ieee488
You may not see it, but you can set it up.serial.redirect(SerialPin.P0, SerialPin.P1, 9600)
And where is this information?



Anyway, serial into Arduino then Arduino write to EEPROM
or Arduino read from EEPROM then serial from Arduino to BBC micro:bit

You need to write the code on both ends.

Giga_question

Ok thanks for being patient with me.
You've answered quite well THX

arceoedrian

HI , I'm new in using eeprom storage i want to store last command in may arduino during power interaction  , GMS to arduino  Im sending character 'a' in GSM , how can i save in the eeprom of arduino, any one can help me. Thanks

arceoedrian

my code is working in arduino  using GSM and Bluetooth my problem is during power interaction , i need to store the last command.

Giga_question

I don't know much about coding in with bluetooth, but if there is such thing as a incoming bluetooth string then I would set a variable in voidloop() to bluetooth strings then put

EEPROM.write(address, bluetoothstring)

Or something like that

PaulS

Quote
i need to store the last command.
Permission granted. If you need help, POST YOUR CODE.
The art of getting good answers lies in asking good questions.

arceoedrian

I send character both  Bluetooth and GSM  , but i don't know to save in eeprom in arduino

arceoedrian

may be i will post my code , I hope you can help me . thanks

arceoedrian

int R1pin=11;
int R2pin=9;
char inByte;
char incomingByte ;
int R1State=0;
int R2State=0;
void setup()
{
 Serial2.begin(9600);   // Setting the baud rate of H-05 Module
 Serial1.begin(9600);   // Setting the baud rate of GSM Module  
 Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
 pinMode(11,OUTPUT);
 pinMode(9,OUTPUT);
 pinMode(2,OUTPUT);
 Serial.println (" Ready");
 //delay( 200);  
 digitalWrite (11, HIGH);
 digitalWrite (9, HIGH);
}


void loop()

{
 START:
 if (Serial.available())
  switch(Serial.read())
 {
   case 's':
     SendMessage();
     Serial.println( "TEST");
     break;
   case 'r':
    RecieveMessage();
     Serial.println( "RUN");
   break;
 }

if (Serial1.available())
{
inByte= Serial1.read();
Serial.write(inByte);
//Serial.write(Serial1.read());

switch (inByte)
{
 case 'a':
  SendMessage();
 digitalWrite (11, LOW);
  delay(200);
  goto START;
 break;
 case 'b':
 digitalWrite (9, LOW);
  SendMessage1();
  delay(200);
  goto START;
 break;


}

}



void SendMessage()
{
 Serial1.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
 delay(500);  // Delay of 1000 milli seconds or 1 second
 Serial1.println("AT+CMGS=\"+639174220907\"\r\n"); // Replace x with mobile
 delay(500);
 Serial1.println("APPLIANCES 1 ON:)");// The SMS text you want to send
 delay(100);
 Serial1.println((char)26);// ASCII code of CTRL+Z
 delay(500);  
 
}
void SendMessage1()
{
 Serial1.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
 delay(500);  // Delay of 1000 milli seconds or 1 second
 Serial1.println("AT+CMGS=\"+639174220907\"\r"); // Replace x with mobile number
 delay(500);
 Serial1.println("APPLIANCES 2 ON:)");// The SMS text you want to send
 delay(100);
 Serial1.println((char)26);// ASCII code of CTRL+Z
 delay(500);  
 
}


arceoedrian

Hi, i posted my code both Bluetooth and GSM  please help on how to save the character in  in eeprom in arduino, i hope you can help me in my problem .. Thanks

Go Up