#include <SoftwareSerial.h>
SoftwareSerial BluetoothSerial(1,0);
void setup()
{
Serial.begin(9600);
pinMode(8,OUTPUT);// open solenoid
}
void loop()
{
if ( Serial.available () > 0 )
{
static char input[16];
static uint16_t i;
char c = Serial.read ();
if ( c != ‘\r’ && i < 15 )
input[i++] = c;
else
{
input = ‘\0’;
i = 0; *
int number = atoi( input );*
}*
}*
BluetoothSerial.println(number);*
digitalWrite(8, HIGH);*
delay(number);*
digitalWrite(8, LOW);*
delay(1000);* } This code it no work. error ‘number’ in delay. My input is number no over 99999 from android.I want to read value one time. How does it work. Sorry,if you don’t understand my english is not good. Regards, Bob
You do not understand much do you.
Before you post any more code learn how to so it properly. Read How to use this forum - please read. - Project Guidance - Arduino Forum
on how to do it and how to use this forum.
Then post your code correctly and it will no be mangled by the forum and we can see it all and tell you what is wrong, which is a lot.