First of all sorry for my englishi
i send analogRead() value to another arduino + xbee.
the value is 51 for example .but read is 0A 35 31 0D .what is the problem?
how to change it to the value i want .
in XCTU it could be changed auto.
but what is the Formula?
A?
const int analogInPin = A0;
int outputValue = 0;
void setup() {
pinMode(analogInPin,INPUT);
Serial.begin(9600);
}
void loop() {
outputValue=analogRead(analogInPin);
Serial.println(outputValue/4);
delay(1000);
}
B?
const int led = 9; // Analog input pin that the potentiometer is attached to
// value read from the pot
int val = 0;
void setup() {
pinMode(led,OUTPUT);
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
if(Serial.available()>0){
val=Serial.read();
if(val!=-1){
Serial.println(val,HEX);
}
}
}