Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Astreos_Arduino
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hicham Brahimi
Astreos_Arduino
Commits
832090d6
Commit
832090d6
authored
6 years ago
by
hichbra
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
2a4f9ebc
Branches
Branches containing commit
No related merge requests found
Pipeline
#110
canceled with stages
Stage:
Stage:
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ASTREOS_SMP.ino
+7
-7
7 additions, 7 deletions
ASTREOS_SMP.ino
with
7 additions
and
7 deletions
ASTREOS_SMP.ino
+
7
−
7
View file @
832090d6
#define PORT_HALL A0
#define PORT_HALL A0
#define PORT_FSR A2
#define PORT_FSR A2
int
hallAnalogique
;
int
hallAnalogique
;
// La lecture analogique du gaussmetre
int
gauss
;
int
gauss
;
// Valeur convertie en gauss
// -------------------------------------------------
// -------------------------------------------------
int
fsrAnalogique
;
// La lecture analogique depuis le pont diviseur FSR+Resistance.
int
fsrAnalogique
;
// La lecture analogique depuis le pont diviseur FSR+Resistance.
int
fsrVoltage
;
// La lecture analogique convertie en tension
int
fsrVoltage
;
// La lecture analogique convertie en tension
unsigned
long
fsrResistance
;
// La tension convertie en resistance
unsigned
long
fsrResistance
;
// La tension convertie en resistance
unsigned
long
fsrConductance
;
unsigned
long
fsrConductance
;
long
fsrForce
;
// La resistance convertie en force (Newton)
long
newton
;
// La resistance convertie en force (Newton)
//--------------------------------------------------
//--------------------------------------------------
void
setup
(){
void
setup
(){
...
@@ -50,7 +50,7 @@ void loop(){
...
@@ -50,7 +50,7 @@ void loop(){
//Serial.print("Conductance en micro-ohm : "); Serial.println(fsrConductance);
//Serial.print("Conductance en micro-ohm : "); Serial.println(fsrConductance);
// Approximation de la force en Newton
// Approximation de la force en Newton
fsrForce
=
fsrConductance
/
80
;
newton
=
fsrConductance
/
80
;
//Serial.print("Force en Newtons: "); Serial.println(fsrForce);
//Serial.print("Force en Newtons: "); Serial.println(fsrForce);
}
}
...
@@ -61,9 +61,9 @@ void loop(){
...
@@ -61,9 +61,9 @@ void loop(){
Serial
.
print
(
"=> champ magnétique = "
);
Serial
.
print
(
gauss
);
Serial
.
println
(
" Gauss"
);
Serial
.
print
(
"=> champ magnétique = "
);
Serial
.
print
(
gauss
);
Serial
.
println
(
" Gauss"
);
// Affiche la valeur du capteur de force (Tension/Newton)
// Affiche la valeur du capteur de force (Tension/Newton)
Serial
.
print
(
"=> Force Analogique = "
);
Serial
.
print
(
fsrAnalogique
);
Serial
.
print
(
" || Force en Newtons: "
);
Serial
.
println
(
fsrForce
);
Serial
.
print
(
"=> Force Analogique = "
);
Serial
.
print
(
fsrAnalogique
);
Serial
.
print
(
" || Force en Newtons: "
);
Serial
.
println
(
newton
);
// attendre 1
/10 de
seconde
// attendre 1
00 milli
seconde
s
delay
(
100
0
);
delay
(
100
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
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