June 29, 2010
So I'm testing my ultrasonic sensor for mmy turret and I have run across a problem. This is that there are only 27 word (w0,w1,w2) varriables. So I have to use byte variables (b0,b1,b2). The ultrasonic read the range into a word variable, so then I have to convert this big number down to the size that can fit into a byte. So I used division. b0 = w0 / 100. Then I ran into another problem. The Picaxe takes the next varriable b1 to fill it up with the deciaml place. So 19.24 would be b0=19 and b1 = 2. Now I don't want this because I need to use b2 and I need all those 50 varriables. Is there a way to get rid of the deciaml places.