Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4928

hi, ineed this code work on pic by making input/output proportional to rpm 800-2000 thank you

$
0
0
Code (C):
  1. #include<math.h>
  2. #include<stdio.h>
  3. main()
  4. {
  5.    /* prints a logarithmic vertical axis (abcissa) */
  6.    int step[]={7,4,3,3,3,2,2,2,1,1};
  7.    int label[]={800,1000,1300,1400,1500,1600,1700,1800,1900,2000};
  8.    int i, j;
  9.    for (j = 0; j < 10; ++j)
  10.    {
  11.      printf("\n%4d +",label[j]);
  12.      for (i = 0;i < step[j]; ++i)
  13.      printf("\n  | ");
  14.    }
  15. }

Viewing all articles
Browse latest Browse all 4928

Trending Articles