Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //Graph
  2. if ((--countGraph) == 0)
  3. {
  4. countGraph = INTERVAL_GRAPH;
  5. runGraph = true;
  6. }
  7.  
  8.  
  9. /***********************/
  10. //GRAPH_Value
  11. /***********************/
  12. void GRAPH_value (void)
  13. {
  14. int percent;
  15. int adc_result;
  16.  
  17.  
  18. ADC_init(1); // uses ADC for Light
  19.  
  20. adc_result = ADC; // converts ADC value to percent
  21.  
  22. percent = adc_result*0.097;
  23. itoa(percent, graph_string, 8);
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. bool runGraph = false;
  32.  
  33.  
  34.  
  35. char countGraph = 20;
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. #define INTERVAL_GRAPH 20;
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. char graph_string[8];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement