Shifting code from PICAXE to Arduino


good morning all,
i 9th grader working on science project (www.instructables.com/id/air-quality-balloons/) built sensor detect vocs , led react data turn green, yellow, or red based on low, average, , high values. trying shift code picaxe editor ardunio doesn't cross on well.

picaxe code:

main:
'w5 = 448 'voc green'
'w6 = 470 'voc red'

goto runsensor

runsensor:
readadc10 4, w3'sensor value'
if w3 < w5 'green'
   high 1
   low 2
endif

if w3 >= w5 , w3 < w6 'yellow'
   high 1
   high 2
   
if w3 >= w6 'red'
low 1
high 2
endif
pause 500
goto runsensor

any ideas??? thanks! (ps code got instructables website hoping correct; shifting picaxe because picaxe doesn't want read tiny avr programmer purchased) doesn't want

quote
but doesn't cross on well.
of course doesn't. picaxe not programmed using c++. arduino is.

quote
any ideas???
ditch whole idea of trying port code. understand does, , write same thing in c++. or, hardware destructable site used.


Arduino Forum > Using Arduino > Programming Questions > Shifting code from PICAXE to Arduino


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???