Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

analogWrite added

  • Loading branch information...
commit 193ee92031db0fad2ad8759baf03baa854cf867b 1 parent 840a479
@kiilo authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 arduino_sketchbook/node_arduino/node_arduino.ino
View
8 arduino_sketchbook/node_arduino/node_arduino.ino
@@ -80,10 +80,14 @@ void loop()
if( c == 'o') { // o Pin PinStatus :: output pin
Pin = finder.getValue();
PinStatus[Pin] = finder.getValue();
- if (PinModes[Pin] > 0) {
+ if (PinModes[Pin] == 1) {
digitalWrite(Pin, PinStatus[Pin]);
}
+ if (PinModes[Pin] == 2) {
+ analogWrite(Pin, PinStatus[Pin]);
+ }
}
+
if( c == 'm') { // m Pin PinMode :: PinMode change pin mode
Pin = finder.getValue();
Mode = finder.getValue();
@@ -159,7 +163,7 @@ void connectTCP() {
Serial.println("connected");
// send secret key fo auth:
client.println("k BC37ACB390EF2");
- TextFinder finder( client);
+ TextFinder finder( client, 1);
}
else {
// kf you didn't get a connection to the server:
Please sign in to comment.
Something went wrong with that request. Please try again.