I have 3d compass from Rion-tech.com its name HCM505B RS-232
and I need to get data from it to my Arduino UNO
I am beginner so as I read I have to send byte in some numbers and recive then bytes that containing the values like 68 04 00 04 08
I try to do that but I have no response..
so can any one help me please . .
I know that is a very simple thing for experts but as I said I am beginner.
I use MAX232CPE to convert between TTL and RS232 and make the circuit and every thing seems alright
Bu I still can't getting dat from this compass
the command that respose to get data; send "68 04 00 04 08"
then the value will recived
the problem that when i send this code in the command in the serial no thing happens
and I tried to send the order as
MySerial.print(68 04 00 04 08);
an error message says ; " integer constant is too large for 'long' type" apears
Kamal-15:
any one here guys
my year project depends on this
Maybe this is enough of a clue... We DO NOT DO HOMEWORK FOR YOU.
//Code for Dialling a number
char phone_no[]=”9443303461”;
void setup()
{
Serial.begin(9600); //Open Serial Connection at baudrate 9600
delay(2000);
Serial.println(“AT”); // Wake up GSM
Serial.print(“ATD”); //Dial the phone number using ATD command
Serial.print(phone_no);
Serial.println(“;”); // Semicolon is a must at the end
delay(10000);
Serial.println(“ATH”); // After a delay of 5 secs Hang the call
}
void loop()
{
// empty loop.If you enter the above code here,the call will be made FOR EVER repeatedly.
//Take Caution while coding under loop.At some condition you’ve to terminate the Call
}