#include #define rxPin 1 #define txPin 2 #define sensor 2 SoftwareSerial mySerial(rxPin, txPin); void setup() { // put your setup code here, to run once: mySerial.begin(9600); } void loop() { // put your main code here, to run repeatedly: int value = analogRead(sensor); value = map(value, 0, 1023, 0, 255); mySerial.println(value); }