i have been watching your workshop it is great i am having a problem when i try to manage my library or upload to my library it keep saying cc.arduino.contribuion.librery please can you help
Ah Crap, I read that title as using Two Serial ports, since At Mega has two ports. can I shunt the data of one Serial.read() to print that out in the second Serial port and view that in the serial monitor? It be helpful to he able to see the incoming data, while using it...
int ledPin = 3; int buttonPin = 2; int potPin = A0; void setup() { // setup pin modes pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT_PULLUP); pinMode(potPin, INPUT); // initialise serial port with baud rate of 9600 Serial.begin(9600); } void loop() { // read the state of buttonPin and store it as buttonState (0 or 1) int buttonState = digitalRead(buttonPin); // read the value of the pot, divide it by 4, and store it as potValue int potValue = analogRead(potPin); int filteredPotValue = potValue / 4; // turn led on with the value of potValue analogWrite(ledPin,filteredPotValue); // print the value of the button Serial.print("Button: "); Serial.print(buttonState); Serial.print(" "); // print the value of the pot Serial.print("Pot: "); Serial.print(potValue); Serial.print(" "); // print the value of the pot / 4 with a line return at the end Serial.print("Pot/4: "); Serial.println(filteredPotValue); }