I am looking at the Picaxe 40X2 pinout diagram and am not sure what I am looking at.
I want to input a level from 20 LDRs and output drive to 20 LEDs to make a train detector for my garden railway layout.
I idea being that an LDR will be between the tracks at points around the track and as the train passes over the resulting level change will be read by the picaxe and light a corresponding LED on a board the has a schematic of the layout so I can see at a glance the position of trains running.
I will also be planning to use a picaxe to show the setting of remote control points but that is another project.
I know that I have to use ADC as my input for the LDRs and In/Out for the LEDs the question is what is the meaning of for example D.7 {ADC27/touch} does that mean that the pin can be configured as an ADC input and what do I put into my program to configure it? I have read the readadc description in the manual but am not sure if I am reading it right.
I want to input a level from 20 LDRs and output drive to 20 LEDs to make a train detector for my garden railway layout.
I idea being that an LDR will be between the tracks at points around the track and as the train passes over the resulting level change will be read by the picaxe and light a corresponding LED on a board the has a schematic of the layout so I can see at a glance the position of trains running.
I will also be planning to use a picaxe to show the setting of remote control points but that is another project.
I know that I have to use ADC as my input for the LDRs and In/Out for the LEDs the question is what is the meaning of for example D.7 {ADC27/touch} does that mean that the pin can be configured as an ADC input and what do I put into my program to configure it? I have read the readadc description in the manual but am not sure if I am reading it right.