From 4639d86cf378a2f0d014bcf484f5b67a50f5e550 Mon Sep 17 00:00:00 2001 From: TeeVoe Date: Sat, 24 Feb 2018 14:28:07 -0800 Subject: [PATCH 1/3] Arduino Code Changed byte to int on line 24 --- Github_Tutorial.ino | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Github_Tutorial.ino b/Github_Tutorial.ino index 80143fc..3896535 100644 --- a/Github_Tutorial.ino +++ b/Github_Tutorial.ino @@ -2,11 +2,11 @@ 12-29-2012 Spark Fun Electronics Nathan Seidle - + This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). - + This is bad code but is used to demonstrate how to use repositories on github. - + If we have an analog sensor such as a trimpot or flex sensor on A0, this code would attempt to read it and output it to the terminal at 9600bps. */ @@ -19,14 +19,13 @@ void setup() pinMode(A0, INPUT); } -void loop() +void loop() { - byte myValue = 0; + int myValue = 0; myValue = analogRead(A0); - + Serial.print("The value is: "); Serial.println(myValue); delay(250); } - From c76cc4915158066a60f523ba911f34cb39a75b2b Mon Sep 17 00:00:00 2001 From: TeeVoe Date: Sat, 24 Feb 2018 14:46:26 -0800 Subject: [PATCH 2/3] Testing Implementing bug back into code --- Github_Tutorial.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Github_Tutorial.ino b/Github_Tutorial.ino index 3896535..9ea276a 100644 --- a/Github_Tutorial.ino +++ b/Github_Tutorial.ino @@ -21,7 +21,7 @@ void setup() void loop() { - int myValue = 0; + byte myValue = 0; myValue = analogRead(A0); Serial.print("The value is: "); From 8d28cdc04722bfaafa9fb66d55571bbf3182d6df Mon Sep 17 00:00:00 2001 From: TeeVoe Date: Sat, 24 Feb 2018 14:48:03 -0800 Subject: [PATCH 3/3] Bug Fix Changed byte to integer. analogRead returns an integer. --- Github_Tutorial.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Github_Tutorial.ino b/Github_Tutorial.ino index 9ea276a..3896535 100644 --- a/Github_Tutorial.ino +++ b/Github_Tutorial.ino @@ -21,7 +21,7 @@ void setup() void loop() { - byte myValue = 0; + int myValue = 0; myValue = analogRead(A0); Serial.print("The value is: "); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy