Hi, I'm building a dual mode machine, 3d Printer and pick and place machine. I'm writing my own firmware for pick and place, so I added the files in the repetier firmware folder, and added a conditional at the very begin of the program:
void setup()
{
pinMode(machineStartPin,INPUT);
machineMode = analogRead(machineStartPin);//this call mess up future adc readings...
if(machineMode == 0){
Printer::setup();}
else{
PickAndPlace::setup();}
}
as you can see in the comment, that call to analogRead will mess up the readings in printer mode, resulting in thermistors not connected for the heated bed and extruder.
If I remove that line, the printer works fine.
Any ideas?