Hello,
How are the pins declared analog or digital?
To keep things short and simple I will say what I am doing, and that it is working. My problem is I do not understand how it is working.
Basically I have a toggle switch connected to the X-Min Endstop pin on a RAMPS1.4 board, the pin is assigned as follows:
Then I have a filament width sensor connected to AUX_1 peripheral, with the pin assigned as follows:
(Note that the default is normally pin 5 on AUX_2, for my configuration I switched it to pin 3 on AUX_1.)
I have set up some basic code to change the output based on the state of the toggle switch, and when I run the FW the output of the filament width sensor is correct. Then, when I toggle the switch, the output is displayed accordingly and correctly. Which means the two pins, and their assignment, are not interfering with each other. I do not understand why not?
I know the sensor pin must be analog (input), its digital counterpart is 57 (A3 or D57), and the digital pin, well that conforms to the default configuration.
I am using this png file for the PIN verification. Please offer me any insight into this, I have been on the marlin site and github, but have found no clear indication on this distinction (between analog and digital).
Thank you.
How are the pins declared analog or digital?
To keep things short and simple I will say what I am doing, and that it is working. My problem is I do not understand how it is working.
Basically I have a toggle switch connected to the X-Min Endstop pin on a RAMPS1.4 board, the pin is assigned as follows:
#define TOGGLE_SWITCH 3
Then I have a filament width sensor connected to AUX_1 peripheral, with the pin assigned as follows:
// Use the RAMPS 1.4 Analog input 3 on the AUX_1 connector #define FILWIDTH_PIN 3 // ANALOG NUMBERING
(Note that the default is normally pin 5 on AUX_2, for my configuration I switched it to pin 3 on AUX_1.)
I have set up some basic code to change the output based on the state of the toggle switch, and when I run the FW the output of the filament width sensor is correct. Then, when I toggle the switch, the output is displayed accordingly and correctly. Which means the two pins, and their assignment, are not interfering with each other. I do not understand why not?
I know the sensor pin must be analog (input), its digital counterpart is 57 (A3 or D57), and the digital pin, well that conforms to the default configuration.
I am using this png file for the PIN verification. Please offer me any insight into this, I have been on the marlin site and github, but have found no clear indication on this distinction (between analog and digital).
Thank you.