| 1 | # Read ADC Values and plot them |
| 2 | import time |
| 3 | #from kuttyPy import * |
| 4 | from matplotlib import pyplot as plt |
| 5 | |
| 6 | setReg('ADMUX', (1<<6) | 0b01011) #REF_AVCC | A1-A0 x200 |
| 7 | for a in range(50): |
| 8 | setReg('ADCSRA', 196) |
| 9 | cl = getReg('ADCL') |
| 10 | ch = getReg('ADCH') |
| 11 | plt.scatter(a, (ch<<8)|cl ,s=5) |
| 12 | plt.pause(0.01) #Wait 10 mS |