Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino_python_communication
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CREATE Lab
Lab systems
Arduino_python_communication
Commits
5ad0ed90
"src/test/resources/git@ic-gitlab.epfl.ch:lara/inox.git" did not exist on "2f9a1140cd61f856ff6ec674a5cdc56d3a74ce7e"
Commit
5ad0ed90
authored
3 years ago
by
kaijunge
Browse files
Options
Downloads
Patches
Plain Diff
More comments on .ino file
parent
1cf85c30
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyComms/pyComms.ino
+19
-6
19 additions, 6 deletions
pyComms/pyComms.ino
with
19 additions
and
6 deletions
pyComms/pyComms.ino
+
19
−
6
View file @
5ad0ed90
#include
<Arduino.h>
#include
"pyCommsLib.h"
/*
* Variables for you need to define for this program to work
*/
...
...
@@ -32,6 +30,11 @@ void setup() {
}
void
loop
()
{
////////////////////
// RECEIVING DATA
////////////////////
// Receive messages from python
rawMsg
=
recieve_msg
(
rawMsg
);
...
...
@@ -41,14 +44,24 @@ void loop() {
* }
*/
// Fill up your data here
// Make sure to convert anything to a string.
// This can be easilly done by doing String(whatever)
////////////////////
// SENDING DATA
////////////////////
/*
Fill up your data here
MAKE SURE TO CONVERT ANYTHING TO A String TYPE!
This can be easilly done by doing String(whatever) - see Data[1] = String(20);
*/
Data
[
0
]
=
"a"
;
Data
[
1
]
=
"blah"
;
Data
[
1
]
=
String
(
20
)
;
Data
[
2
]
=
rawMsg
;
send_msg
(
msgName
,
Data
,
numOfMsg
);
// this delay is not necessary - it's only to show that even with a delay this process works.
delay
(
100
);
}
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