Différences entre versions de « Projets:Finger Starter »
De wikilab
(15 versions intermédiaires par 2 utilisateurs non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
+ | {{Infobox projet | ||
+ | |Image principale=Finger starter IMG 5739.JPG | ||
+ | |Description=Réaliser un finger starter proposé par Inmoov : [http://inmoov.fr/finger-starter/ finger starter] | ||
+ | |Porteur de projet=Alix | ||
+ | |Contributeurs=Alix | ||
+ | |Fabmanager=Yo | ||
+ | |Référent documentation=Yo | ||
+ | |Catégorie de handicap=Membre supérieur | ||
+ | |Etat d'avancement=Réalisés | ||
+ | |Statut de la documentation=Partielle | ||
+ | |Relecture de la documentation=Non vérifiée | ||
+ | |Licence=by-sa | ||
+ | |Projet date=2021-03-24 | ||
+ | |Nom humanlab=Humanlab_MHK | ||
+ | }} | ||
+ | [[File:finger_starter_IMG_5739.JPG|400px|right]] | ||
+ | |||
== Description du projet == | == Description du projet == | ||
Ligne 37 : | Ligne 54 : | ||
[http://inmoov.fr/finger-starter/ finger starter] | [http://inmoov.fr/finger-starter/ finger starter] | ||
+ | Détail des capteurs : [https://images-eu.ssl-images-amazon.com/images/I/C1lrpIfADaS.pdf Détail des capteurs] | ||
==Image des différentes versions réalisée avec le code correspondant== | ==Image des différentes versions réalisée avec le code correspondant== | ||
− | * 1 - Joystick | + | * 1 - Bouton |
+ | |||
+ | [[File:image000004.jpg|400px]] | ||
+ | |||
+ | <pre> | ||
+ | #include <Servo.h> | ||
+ | |||
+ | Servo myservo; // create servo object to control a servo | ||
+ | |||
+ | const int servoPin = 9; // Digital PWM pin used to control the servo | ||
+ | const int buttonPin = 8; // Digital pin to attach the button | ||
+ | |||
+ | int val = 0; // variable to read the value from the button | ||
+ | |||
+ | void setup() { | ||
+ | myservo.attach(servoPin); // attaches the servo to "servoPin" | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | val = digitalRead(buttonPin); // gets button current state | ||
+ | if (val == 0) { // checks if the button is pressed | ||
+ | myservo.write(120); // lifts finger | ||
+ | } | ||
+ | else { | ||
+ | myservo.write(10); // lowers finger | ||
+ | } | ||
+ | delay(30); // waits for servo to get there | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | [[File:image000005.jpg|400px]] | ||
+ | |||
+ | * 2 - Photo-interrupteur | ||
+ | |||
+ | [[File:image000000.jpg|400px]] | ||
+ | |||
+ | <pre> | ||
+ | #include <Servo.h> | ||
+ | |||
+ | Servo myservo; // create servo object to control a servo | ||
+ | |||
+ | const int servoPin = 9; // Digital PWM used to control the servo | ||
+ | const int photoPin = 8; // Digital pin used to control the photo interruptor | ||
+ | |||
+ | int val = 0; // variable to read the value from the photo interruptor | ||
+ | |||
+ | void setup() { | ||
+ | myservo.attach(servoPin); // attaches the servo to "servoPin" | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | val = digitalRead(photoPin); // reads value from photo interruptor | ||
+ | if (val == 1) { // check if the photo interruptor is blocked | ||
+ | myservo.write(120); // lifts finger | ||
+ | } | ||
+ | else { | ||
+ | myservo.write(10); // lowers finger | ||
+ | } | ||
+ | delay(30); // waits for servo to get there | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | [[File:image000003.jpg|400px]] | ||
+ | |||
+ | * 3 - Photorésistance | ||
+ | |||
+ | [[File:image000002.jpg|400px]] | ||
+ | |||
+ | <pre> | ||
+ | #include <Servo.h> | ||
+ | |||
+ | Servo myservo; // create servo object to control a servo | ||
+ | |||
+ | const int photoResistPin = A0; // Analog pin used to connect the photo resistor | ||
+ | const int servoPin = 9; // Digital PWM used to control the servo | ||
+ | |||
+ | int light = 0; // variable to read the value from the photo resistor pin | ||
+ | |||
+ | void setup() { | ||
+ | myservo.attach(servoPin); // attaches the servo to "servoPin" | ||
+ | pinMode(photoResistPin, INPUT); // puts the photo-resistor pin in INPUT | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | light = analogRead(A0); // reads value from photo-resistor | ||
+ | light = map(light, 0, 1023, 180, 0); // scales it to be usable by the servo | ||
+ | myservo.write(light); // sets the servo position according to the value | ||
+ | delay(30); // waits for the servo to get there | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | [[File:image000001.jpg|400px]] | ||
+ | |||
+ | * 4 - Joystick | ||
+ | |||
+ | [[File:image000006.jpg|400px]] | ||
+ | |||
+ | <pre> | ||
+ | #include <Servo.h> | ||
+ | |||
+ | Servo myservo; // create servo object to control a servo | ||
+ | |||
+ | const int joystickPin = A0; // Analog In pin used to connect the joystick | ||
+ | const int servoPin = 9; // Digital PWM used to control the servo | ||
+ | |||
+ | int rotation = 0; // variable to read the X or Y value from the joystick | ||
+ | |||
+ | |||
+ | void setup() { | ||
+ | myservo.attach(servoPin); // attaches the servo to "servoPin" | ||
+ | pinMode(joystickPin, INPUT); // puts the joystick pin in INPUT | ||
+ | } | ||
− | + | void loop() { | |
+ | rotation = analogRead(A0); // reads value from joystick | ||
+ | rotation = map(rotation, 0, 1023, 180, 0); // scales it to be usable by the servo | ||
+ | myservo.write(rotation); // sets the servo position according to the value | ||
+ | delay(30); // waits for the servo to get there | ||
+ | } | ||
+ | [[File:image000007.jpg|400px]] | ||
[[Category:Projets]] | [[Category:Projets]] | ||
− | [[Category: | + | [[Category:Réalisés]] |
Version actuelle datée du 13 juillet 2022 à 14:10
Finger Starter | |
---|---|
Informations | |
Description | Réaliser un finger starter proposé par Inmoov : finger starter |
Catégorie | Membre supérieur |
Etat d'avancement | Réalisés |
Techniques | |
Durée de fabrication | |
Coût matériel | |
Niveau | |
Licence | by-sa |
Date de création | 2021-03-24 |
Équipe | |
Porteur de projet | Alix |
Contributeurs | Alix |
Fabmanager | Yo |
Référent documentation | Yo |
Nom humanlab | Humanlab_MHK |
Documentation | |
Statut de la documentation | Partielle |
Relecture de la documentation | Non vérifiée |
Description du projet
Le projet est de réaliser un finger starter proposé par Inmoov : finger starter
Cahier des charges
Utiliser un kit de capteurs afin de contrôler le finger starter de manière originale.
Analyse de l'existant
http://inmoov.fr/finger-starter/
Equipe (Porteur de projet et contributeurs)
- Concepteurs/contributeurs : Alix
- Fabmanager référent : Yo
- Responsable de documentation : Yo
Matériel nécessaire
- 1 Finger Starter à imprimer en 3D : http://inmoov.fr/finger-starter/
- Des fils de prototypage
- Platine d'essai
- kit de capteurs : electronic component kits
Outils nécessaires
- Un ordinateur
Coût
- - de 50€
Fichiers source
Détail des capteurs : Détail des capteurs
Image des différentes versions réalisée avec le code correspondant
- 1 - Bouton
#include <Servo.h> Servo myservo; // create servo object to control a servo const int servoPin = 9; // Digital PWM pin used to control the servo const int buttonPin = 8; // Digital pin to attach the button int val = 0; // variable to read the value from the button void setup() { myservo.attach(servoPin); // attaches the servo to "servoPin" } void loop() { val = digitalRead(buttonPin); // gets button current state if (val == 0) { // checks if the button is pressed myservo.write(120); // lifts finger } else { myservo.write(10); // lowers finger } delay(30); // waits for servo to get there }
- 2 - Photo-interrupteur
#include <Servo.h> Servo myservo; // create servo object to control a servo const int servoPin = 9; // Digital PWM used to control the servo const int photoPin = 8; // Digital pin used to control the photo interruptor int val = 0; // variable to read the value from the photo interruptor void setup() { myservo.attach(servoPin); // attaches the servo to "servoPin" } void loop() { val = digitalRead(photoPin); // reads value from photo interruptor if (val == 1) { // check if the photo interruptor is blocked myservo.write(120); // lifts finger } else { myservo.write(10); // lowers finger } delay(30); // waits for servo to get there }
- 3 - Photorésistance
#include <Servo.h> Servo myservo; // create servo object to control a servo const int photoResistPin = A0; // Analog pin used to connect the photo resistor const int servoPin = 9; // Digital PWM used to control the servo int light = 0; // variable to read the value from the photo resistor pin void setup() { myservo.attach(servoPin); // attaches the servo to "servoPin" pinMode(photoResistPin, INPUT); // puts the photo-resistor pin in INPUT } void loop() { light = analogRead(A0); // reads value from photo-resistor light = map(light, 0, 1023, 180, 0); // scales it to be usable by the servo myservo.write(light); // sets the servo position according to the value delay(30); // waits for the servo to get there }
- 4 - Joystick
#include <Servo.h> Servo myservo; // create servo object to control a servo const int joystickPin = A0; // Analog In pin used to connect the joystick const int servoPin = 9; // Digital PWM used to control the servo int rotation = 0; // variable to read the X or Y value from the joystick void setup() { myservo.attach(servoPin); // attaches the servo to "servoPin" pinMode(joystickPin, INPUT); // puts the joystick pin in INPUT } void loop() { rotation = analogRead(A0); // reads value from joystick rotation = map(rotation, 0, 1023, 180, 0); // scales it to be usable by the servo myservo.write(rotation); // sets the servo position according to the value delay(30); // waits for the servo to get there }