Advertisement
Radjah

emul

Aug 21st, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. int Temp = 0;
  2. const int MaxTemp = 1200;
  3. const char eps[9] = "=FFFFA85";
  4. char forsend[16] = "";
  5.  
  6. void setup() {
  7.   Serial.begin(9600, SERIAL_8N2);
  8.  
  9. }
  10.  
  11. void loop() {
  12.   char StrTemp[7] = "";
  13.  
  14.   if (Temp > MaxTemp) {
  15.     Temp = 0;
  16.   }
  17.   sprintf(StrTemp, "%4d\r\n", Temp);
  18.   strcat(forsend, eps);
  19.   strcat(forsend, StrTemp);
  20.   Serial.print(forsend);
  21.   Temp++;
  22.   delay(1000);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement