Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
input_devices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Preiss
input_devices
Commits
877742a3
Commit
877742a3
authored
1 year ago
by
David Preiss
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parents
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
inputDevices_1_basic.ino
+11
-0
11 additions, 0 deletions
inputDevices_1_basic.ino
with
11 additions
and
0 deletions
inputDevices_1_basic.ino
0 → 100644
+
11
−
0
View file @
877742a3
const
int
sensorPin
=
27
;
// Pin where our sensor's output is connected
void
setup
()
{
Serial
.
begin
(
115200
);
// Initialize serial communication with the computer
}
void
loop
()
{
int
reading
=
analogRead
(
sensorPin
);
// Read the analog voltage at sensorPin and store it as an int called reading
Serial
.
println
(
reading
);
// Send that reading over USB to our computer
delay
(
10
);
// Wait time in ms before next reading
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment