Has anyone tried using the modulus division command, but got errors? I have attempted to read a voltage, then transmit the voltage with the integer and decimal parts of the readings.
Since I am also using a voltage divider circuit, I factored that into the calculation.
This part of the code was as follows:
let w2=w1*60 ' multiplying by 60 gives an integer conversion ratio - 4096
let w3 =w2/4096
let w4=w2//4096
Running the simulator, the results were a returned figure of 14.2656 for w1=1000
Using windows calculator, the reading should have been 14.6484375
What's also bizarre about this is when I actually ran the program in the picaxe, the readings it returned were wildly fluctuating, anything from something near reality (11.85 volts) and voltage readings less than 1 volt, a multimeter confirming stable applied voltage.
Any clues as to what the #### is happening here?
Since I am also using a voltage divider circuit, I factored that into the calculation.
This part of the code was as follows:
let w2=w1*60 ' multiplying by 60 gives an integer conversion ratio - 4096
let w3 =w2/4096
let w4=w2//4096
Running the simulator, the results were a returned figure of 14.2656 for w1=1000
Using windows calculator, the reading should have been 14.6484375
What's also bizarre about this is when I actually ran the program in the picaxe, the readings it returned were wildly fluctuating, anything from something near reality (11.85 volts) and voltage readings less than 1 volt, a multimeter confirming stable applied voltage.
Any clues as to what the #### is happening here?