Aller au contenu


stephane83

Inscrit(e) (le) 04 avril 2013
Déconnecté Dernière activité août 25 2013 06:12
-----

Sujets que j'ai initiés

les bases du mouvement serv

23 août 2013 - 08:29

bonsoir à tous, j'aurais voulu savoir quelles sont les bases de programmation sous arduino Uno pour créer un mouvement simple sur un hexapode 12 DOF, exemple je souhaite avancer tout droit !
Merci pour votre future aide ( je début dans la programmation arduino )

problémé code arduino librairie

20 août 2013 - 06:41

salut à tous,

voila je viens de créer un robot hexapode, et je souhaite-le contrôler par un wii nunchuck car: il est pas chère ,et on a un accéléromètre a 3 axes, deux boutons et un joystick pour 15 euro!!

j'ai acheté cette adaptateur :http://www.robotshop.com/productinfo.aspx?pc=RB-Dfr-62&lang=fr-CA pour un carte arduino Uno.

pour m'aider dans programmation j'ai télécharger sur ce page http://www.pobot.org/-Capteurs-Wii-.html , une librairie pour le nunchuck et un exemple de programme pour servo ( piéce jointe les fichier).

et là ça bug : je transfère tout dans arduino et je vérifie, j’obtiens un message d'erreur :

In file included from ChuckServoTest.cpp:3:
/WiiChuck.h:33:23: error: WProgram.h: No such file or directory
In file included from ChuckServoTest.cpp:3:
WiiChuck.h:47: error: 'byte' does not name a type
WiiChuck.h:49: error: 'byte' does not name a type
WiiChuck.h:59: error: 'boolean' does not name a type
WiiChuck.h:63: error: 'byte' does not name a type
WiiChuck.h:64: error: 'byte' does not name a type
WiiChuck.h:65: error: 'boolean' does not name a type
WiiChuck.h:66: error: 'boolean' does not name a type
WiiChuck.h:144: error: 'boolean' does not name a type
WiiChuck.h:147: error: 'boolean' does not name a type
WiiChuck.h:152: error: 'boolean' does not name a type
WiiChuck.h:157: error: 'boolean' does not name a type
WiiChuck.h:188: error: 'byte' does not name a type
/WiiChuck.h: In member function 'void WiiChuck::begin()':
WiiChuck.h:71: error: 'cnt' was not declared in this scope
WiiChuck.h:72: error: 'averageCounter' was not declared in this scope
WiiChuck.h:74: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

WiiChuck.h:75: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

/WiiChuck.h: In member function 'void WiiChuck::calibrateJoy()':
WiiChuck.h:87: error: 'joyX' was not declared in this scope
WiiChuck.h:88: error: 'joyY' was not declared in this scope
/WiiChuck.h: In member function 'void WiiChuck::update()':
WiiChuck.h:96: error: 'cnt' was not declared in this scope
WiiChuck.h:96: error: 'class TwoWire' has no member named 'receive'

As of Arduino 1.0, the Wire.receive() function was renamed to Wire.read() for consistency with other libraries.

WiiChuck.h:96: error: '_nunchuk_decode_byte' was not declared in this scope
WiiChuck.h:99: error: 'cnt' was not declared in this scope
WiiChuck.h:100: error: 'lastZ' was not declared in this scope
WiiChuck.h:100: error: 'buttonZ' was not declared in this scope
WiiChuck.h:101: error: 'lastC' was not declared in this scope
WiiChuck.h:101: error: 'buttonC' was not declared in this scope
WiiChuck.h:109: error: 'joyX' was not declared in this scope
WiiChuck.h:110: error: 'joyY' was not declared in this scope
WiiChuck.h:113: error: 'B00000011' was not declared in this scope
WiiChuck.h:118: error: 'B00000001' was not declared in this scope
WiiChuck.h:119: error: 'B00000010' was not declared in this scope
/WiiChuck.h: In member function 'int WiiChuck::readJoyX()':
WiiChuck.h:163: error: 'joyX' was not declared in this scope
/WiiChuck.h: In member function 'int WiiChuck::readJoyY()':
WiiChuck.h:167: error: 'joyY' was not declared in this scope
/WiiChuck.h: In member function 'void WiiChuck::_send_zero()':
WiiChuck.h:197: error: 'class TwoWire' has no member named 'send'

As of Arduino 1.0, the Wire.send() function was renamed to Wire.write() for consistency with other libraries.

ChuckServoTest.cpp: In function 'void setup()':
ChuckServoTest.pde:-1: error: 'PC3' was not declared in this scope
ChuckServoTest.pde:-1: error: 'PC2' was not declared in this scope

Donc je me dis qu'il faudrait que je test un autre fichier,


du coup je vais sur ce cette page qui est super : http://blog.oscarliang.net/wii-nunchuck-arduino-tutorial/

et la aussi une erreur que même la personne qui a créé ce tuto ne comprend pas :

In file included from nunchuk_h.cpp:1:
/nunchuck.h:8:22: error: WProgram.h: No such file or directory
/nunchuck.h:10:25: error: utility\twi.h: No such file or directory
In file included from nunchuk_h.cpp:1:
nunchuck.h:13: error: 'byte' was not declared in this scope
nunchuck.h:13: error: expected `)' before numeric constant
nunchuck.h:13: error: expected `]' before ';' token
nunchuck.h:17: error: 'byte' does not name a type
nunchuck.h:18: error: 'byte' does not name a type
nunchuck.h:19: error: 'byte' does not name a type
nunchuck.h:20: error: 'byte' does not name a type
nunchuck.h:21: error: 'byte' does not name a type
nunchuck.h:22: error: 'boolean' does not name a type
nunchuck.h:23: error: 'boolean' does not name a type
nunchuck.h:26: error: 'byte' does not name a type
nunchuck.h:27: error: 'byte' does not name a type
nunchuck.h:28: error: 'byte' does not name a type
nunchuck.h:29: error: 'byte' does not name a type
nunchuck.h:30: error: 'byte' does not name a type
nunchuck.h:32: error: 'byte' does not name a type
nunchuck.h:38: error: 'byte' does not name a type
/nunchuck.h: In function 'void clearTwiInputBuffer()':
nunchuck.h:64: error: 'Wire' was not declared in this scope
/nunchuck.h: In function 'void ConvertOutputs()':
nunchuck.h:93: error: 'byte' was not declared in this scope
nunchuck.h:93: error: expected `;' before 'temp_JX'
nunchuck.h:94: error: expected `;' before 'temp_JY'
nunchuck.h:95: error: expected `;' before 'temp_AX'
nunchuck.h:96: error: expected `;' before 'temp_AY'
nunchuck.h:97: error: expected `;' before 'temp_AZ'
nunchuck.h:99: error: 'temp_JX' was not declared in this scope
nunchuck.h:99: error: 'outbuf' was not declared in this scope
nunchuck.h:100: error: 'temp_JY' was not declared in this scope
nunchuck.h:101: error: 'temp_AX' was not declared in this scope
nunchuck.h:101: error: 'map' was not declared in this scope
nunchuck.h:102: error: 'temp_AY' was not declared in this scope
nunchuck.h:103: error: 'temp_AZ' was not declared in this scope
nunchuck.h:105: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:106: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:107: error: 'NunC_BC' was not declared in this scope
nunchuck.h:108: error: 'NunC_BC' was not declared in this scope
nunchuck.h:119: error: 'NunC_JX_buf' was not declared in this scope
nunchuck.h:119: error: 'bIndex' was not declared in this scope
nunchuck.h:120: error: 'NunC_JY_buf' was not declared in this scope
nunchuck.h:121: error: 'NunC_AX_buf' was not declared in this scope
nunchuck.h:122: error: 'NunC_AY_buf' was not declared in this scope
nunchuck.h:123: error: 'NunC_AZ_buf' was not declared in this scope
nunchuck.h:135: error: 'NunC_JX' was not declared in this scope
nunchuck.h:142: error: 'NunC_JY' was not declared in this scope
nunchuck.h:149: error: 'NunC_AX' was not declared in this scope
nunchuck.h:156: error: 'NunC_AY' was not declared in this scope
nunchuck.h:163: error: 'NunC_AZ' was not declared in this scope
/nunchuck.h: In function 'void NunC_Init(short unsigned int)':
nunchuck.h:180: error: 'PORTC' was not declared in this scope
nunchuck.h:180: error: 'PORTC2' was not declared in this scope
nunchuck.h:180: error: '_BV' was not declared in this scope
nunchuck.h:181: error: 'PORTC3' was not declared in this scope
nunchuck.h:182: error: 'DDRC' was not declared in this scope
nunchuck.h:183: error: 'delay' was not declared in this scope
nunchuck.h:187: error: 'Wire' was not declared in this scope
nunchuck.h:192: error: 'TWBR' was not declared in this scope
nunchuck.h:192: error: 'CPU_FREQ' was not declared in this scope
nunchuck.h:194: error: 'byte' was not declared in this scope
nunchuck.h:194: error: expected `;' before 'rc'
nunchuck.h:207: error: 'millis' was not declared in this scope
nunchuck.h:210: error: expected `)' before numeric constant
nunchuck.h:210: error: expected `)' before ';' token
nunchuck.h:215: error: expected `)' before numeric constant
nunchuck.h:215: error: expected `)' before ';' token
nunchuck.h:220: error: 'rc' was not declared in this scope
nunchuck.h:224: error: 'rc' was not declared in this scope
nunchuck.h:229: error: expected `;' before 'i'
nunchuck.h:230: error: 'outbuf' was not declared in this scope
nunchuck.h:230: error: 'readControllerIdent' was not declared in this scope
nunchuck.h:232: error: 'Serial' was not declared in this scope
nunchuck.h:233: error: 'i' was not declared in this scope
nunchuck.h:233: error: expected `)' before numeric constant
nunchuck.h:235: error: 'HEX' was not declared in this scope
nunchuck.h:241: error: 'Serial' was not declared in this scope
/nunchuck.h: At global scope:
nunchuck.h:245: error: 'boolean' does not name a type
/nunchuck.h: In function 'void NunC_SendNextByteRequest()':
nunchuck.h:266: error: 'byte' was not declared in this scope
nunchuck.h:266: error: expected `;' before 'i'
nunchuck.h:266: error: 'i' was not declared in this scope
nunchuck.h:268: error: 'Wire' was not declared in this scope
nunchuck.h:268: error: expected `)' before numeric constant
nunchuck.h:268: error: expected `)' before ';' token
/nunchuck.h: In function 'void print()':
nunchuck.h:277: error: 'Serial' was not declared in this scope
nunchuck.h:277: error: 'NunC_JX' was not declared in this scope
nunchuck.h:277: error: 'DEC' was not declared in this scope
nunchuck.h:280: error: 'NunC_JY' was not declared in this scope
nunchuck.h:283: error: 'NunC_AX' was not declared in this scope
nunchuck.h:286: error: 'NunC_AY' was not declared in this scope
nunchuck.h:289: error: 'NunC_AZ' was not declared in this scope
nunchuck.h:292: error: 'NunC_BZ' was not declared in this scope
nunchuck.h:295: error: 'NunC_BC' was not declared in this scope
nunchuk_h.cpp: In function 'void loop()':
nunchuk_h:11: error: 'NunC_RecieveCommand' was not declared in this scope
nunchuk_h:13: error: 'NunC_JX' was not declared in this scope
nunchuk_h:16: error: 'NunC_JY' was not declared in this scope
nunchuk_h:19: error: 'NunC_AX' was not declared in this scope
nunchuk_h:22: error: 'NunC_AY' was not declared in this scope
nunchuk_h:25: error: 'NunC_AZ' was not declared in this scope
nunchuk_h:28: error: 'NunC_BC' was not declared in this scope
nunchuk_h:31: error: 'NunC_BZ' was not declared in this scope



si Quelqu'un peut m'aider à trouver une solution, merci d'avance !!
et a bientôt!

petit hexapod

13 juillet 2013 - 12:02

salut à tous, bon je suis dans ma phase apprentissage de la programmation sous arduino, et j’avoue que je suis un peu pommé ou décourager... Lol, je me suis acheté deux livres pour y voir plus clair :
http://www.amazon.fr/Arduino-Ma%C3%AEtrisez-programmation-dinterface-shields/dp/2100559273/ref=sr_1_2?ie=UTF8&qid=1373709271&sr=8-2&keywords=arduino
http://www.amazon.fr/Personnalisez-vos-montages-Arduino-Techniques/dp/2866611918/ref=sr_1_13?ie=UTF8&qid=1373709302&sr=8-13&keywords=arduino ( ps: cadeau d'un ami ^^)

Et donc je suis dedans chaque soir ( c'est un gros mensonge XD, plus tôt une fois par semaine), mais je sans que je perds ma motivation, alors quoi de mieux pour repartir de plus belle, que d'avoir un nouveau projet motivant !
et vous quelle a été votre démarche pour apprendre au mieux la programmation ? vous avez eu comme moi une phase latente ?

Donc voici mon projet ( programme psychologique pour relancer ma motivation ...^^): une hexapod à 12 servomoteurs, 2 servos par pattes.
Pour ce projet, j'ai pris des micros servo de 9 g, une arduino Uno avec un shield de prototypage, pour faire mes connections servo à l'alimentation externe et arduino, puis...une interface nunchuk wii pour piloter le robot, car je me suis dit que sa ne coute rien et j'ai vu sur le net des réalisations cool avec cette manette (ps: là, la programmation va être lourd si, vous avez des infos sur le code manette nunchuk contrôle servo, je suis preneur !).
le tout alimentait par 4 piles r6 1.4v pour les servos ( je ne suis pas sûr que sa suffise) et une pile 9v pour l'arduino.

j'ai fini le montage arduino + shield, voici une photo!
je suis donc passé à la réalisation du support, il est en plexiglas 3mm (car il est gratuit à mon travail), il a le diamètre d'un cd de musique et ...... ben j'ai stoppé net, car ma dremel a rendu l'âme -_-' (le côté psy prend un coup !), mais voici quand même une photo de la base!

Voila au finale je pense que ce genre de petit robot motive et si vous n'y voyez pas d'inconvénient ( et si j'arrive à le finir et à le programmé XD) je souhaiterai faire un tuto pour les débuts comme moi!??je vous dis à bientôt, et j'ai hâte de pouvoir lire vos commentaires et sur tout vos suggestions, car ne l'oubli-ont pas je suis qu'un petit débutant !! je vous donne des nouvelles quand ma dremel sera fonctionnelle.

robby 1

21 juin 2013 - 10:51

salut à tous,
je viens vous présenter mon Robby que j'ai réalisé avec votre super tuto !
La chassie est monté sur deux étages( le 1er avec les moteurs et la platine, le 2eme avec l'adruino), il a été découper dans du plexiglas et affiner à la dremel!
le programme du tuto marche super et j'ai vraiment appris sur le langage adruino!! ( un big + à robocop)

j'ai en plus rajouté un mini-servomoteur pour faire une tête avec le capteur infrarouge!
donc la tête est branché sur le pin 8, au gnr de l'adruino, à l'alimentation des piles et fait un balayage devant le robot .
pour le mouvement j'ai rajouté ce programme à celui du tuto:
#include <Servo.h>

Servo tete;


int pos = 0;

void setup()
{
tête.attach(8);
}


void loop()
{
for(pos = 0; pos < 180; pos += 1)
{
tete.write(pos);
delay(15);
}
for(pos = 180; pos>=1; pos-=1)
{
tete.write(pos);
delay(15);
}
}

Donc tout marche bien !


Maintenant je me dis que si la tête bouge il peut prendre la décision d'aller la ou les d'obstacles sont le plus loin, je m'explique:

il roule, il détecte un obstacle en face de lui, il fait un balayage à droite et à gauche, pour voir ou il n'y a pas d'obstacle, puis il prend cette direction ... etc

vous croyez que cela est possible ? Une petite piste pour la programmation ? merci à plus tard !

petit projet du weekend ^^

19 mai 2013 - 05:39

Salut à tous, et encore merci pour votre aide, j'ai acheté un kit ardruino ( :http://www.conrad.fr/ce/fr/product/095060/Kit-de-dmarrage-avec-module-Uno-Arduino-K000007) qui est vraiment top pour les débutants (je le conseille).

Donc j'ai passé une semaine a faire les Tp du livre qui est avec le kit, bon la programmation est vraiment dure pour mon petit cerveau, je me tire les cheveux Lol, mais je m'accroche ! ce weekend je n'ai pas mâle de temps ( il fait que pleuvoir ...) et j'aimerai avoir votre aide pour faire un assemblage servomoteur avec deux photorésistances : le but est de mettre une photorésistance à droite du servo et une autre à gauche, puis que le servo bouge où il y a le plus de lumière.
À votre avis est-il possible de faire ça ? comment le mètre ça en pratique niveau montage des pièces et niveau programmation ?
j'aimerais, si cela ne vous dérange pas ;)/>/>, avoir vos idées et vos solutions pour m'aider.
merci à vous et a bientôt!

ps: je travail sur la base d'une arduino UNO ^^