float resistor1;
float resistor2;
float resistor3;
float resultado;
void setup() {
// put your setup code here, to run once:
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
resistor1 = 12;
resistor2 =0.5;
resistor3 =20;
resultado=(resistor1>0&&resistor2>0&&resistor3>0);
if (resultado>0){
resultado=(-resistor1)+(-resistor2)+(-resistor3);
Serial1.begin(115200);
Serial1.print(resultado);
Serial1.println("ohms");
}
}
void loop() {
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
}