[51] how to send number using ht12e and receive using ht12d

Status
Not open for further replies.

MANO.5

Member level 1
Joined
Mar 15, 2013
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,618
Hai
my project was measuring vehicle speed using gps module and send that value to nearest controller using ht12e and receive using ht12d.encoder has 4 input data pins.so i decide to split the 4 digit and send each digit seperately.But in receiver side i don't know how to receive and made as original data???
 

you can do something like this,

On transmitter side,

HTML:
   // your speed measurement code here
    disp_value = vehicle_speed;

// split the value and send it 
      digits[0] = (disp_value/1000)%10;   // extract thousand's
      digits[1] = (disp_value/100)%10;    // extract hundreds
      digits[2] = (disp_value/10)%10;     // extract tens
      digits[3] = (disp_value%10);         // extract ones

On receiver side,
// get the value and store it in a array
HTML:
disp_value = (digits[0] * 1000) + (digits[1] * 100) + (digits[2] * 10) + (digits[3]); 
         vehicle_speed = disp_value;
         // do something

Hope it helps.
 

yes but this digit should contain nibble values only.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…