#include int smoke = 3; int desire = 500; int sensor = 0; SoftwareSerial myserial(1,0); void setup() { myserial.begin(9600); pinMode(smoke,INPUT); } void loop() { sensor = analogRead(smoke); if (sensor > desire) { myserial.println("z"); } else { Serial.print("Pin A0: "); Serial.println(sensor); } } // Slightly different, this makes the rainbow equally distributed throughout