I have simplified the program some what and speed-ed it
up. I was missing some of the compression pulses at 10 milliseconds.
Here is the new program with comments.
.
Cls '.........................clear the screen
3 Open "press.dat" For output As #1 'open a file on the SD card
'..............................................................upper and
lower case does
'...............................................................not
matter in MM BASIC.
5 SetPin 9,1 '............set up pin 9 for A 2 D input
6 Print "rotor 1" '......print on the screen
7 Print Date$ '.......print on the screen
8 Print Time$ '........print on the screen
SetTick 10,30 '.....wait until 10 milliseconds has past
'............................and then go do it.
10 'bakgr '.........twiddle thy thumbs
15 GoTo 10
30
For x = 1 To 8 '....sample & record 8 readings as fast as possible
'.............................probably as often as a few dozen microseconds.
press = Pin(9)
Print press ; '.......print on the screen
Print #1, press; '.....record it
Print #1, ",";
Next
Print '..............print a carriage return on the screen
Print #1, '...........record a carriage return in the file
35 IReturn '......software interrupt return
Here is a picture of the output on the screen.
These numbers need to be doubled because of the
voltage divider. As you can see there are 3 pulse
in a row indicating this rotor is OK.
The numbers data file is an ASCII or txt file so you need to open it
with word pad. It is zipped because it would display on
your cell phone as one great big long message.
Paul Lamar
The Rotary Engine free News Letter. Powered by Linux. If you want off
the list PLEASE let me know and I will remove you. ACRE NL web
site.
http://www.rotaryeng.net You Tube
http://tinyurl.com/beqqxas
Copyright 1998-2016 All world wide rights reserved.