Hello everyone i have two problem,
the first is I want to turn on my circuit through bluetooth, how can I avoid this problem? I intended to send a signal "high" on a relay through bluetooth on a digital pin, I have unfortunately not available to the relay, it might work?
The second problem is this: when i sending the command "C", he gives me a read-only and it stops, but I want to continue to give me the values that detects, what can i solve?
void loop() {
{
while (mySerial.available())
{
char dato= mySerial.read();
switch(dato)
{
case 'C':
{
unsigned long Somma = 0;
for (byte i = 0; i < 10; i ++) {
Somma += analogRead(A0);
delayMicroseconds(160);
}
Somma /= 10;
GradiK = Somma * 500 / 1023.0;
GradiC = GradiK - 248;
GradiF = (GradiC * 9.0 / 5.0) + 32.0;
delay(500);
mySerial.print(GradiC);
mySerial.println("°C ");
}
guixi:
the first is I want to turn on my circuit through bluetooth, how can I avoid this problem?
I assume English is a second language and you want to turn on an Arduino in response to a signal from a Bluetooth device.
This is a bluetooth problem, not an Arduino problem, but I believe it is possible to do it using the appropriate AT command. I believe the signal would simply be the connection, not data, and, once made, Arduino can be fed the data.