https://wiki.techinc.nl/api.php?action=feedcontributions&user=Miles&feedformat=atomTechnologia Incognita - User contributions [en]2024-03-28T13:49:28ZUser contributionsMediaWiki 1.30.0https://wiki.techinc.nl/index.php?title=Skills_exchange&diff=12161Skills exchange2014-05-11T21:56:28Z<p>Miles: /* Skills transfers on offer */ added myself to "interested"</p>
<hr />
<div>This page lists both people wanting to give workshops (or other skill transfer) and people looking to acquire certain skills.<br />
<br />
Once an event becomes more concrete, it will be announced on the members list and will shop up on the [[events]] page. <br />
<br />
== Skills transfers on offer ==<br />
List of workshops that members feel they have the skills to give.<br />
<br />
{| class="wikitable"<br />
!Name<br />
!Level<br />
!Organiser<br />
!Interested<br />
!Notes<br />
|-<br />
|Soldering<br />
|Beginner<br />
|[[User:Brainsmoke|Brainsmoke]]<br />
|<br />
|Soldering both through hole and SMD components.<br />
|-<br />
|Basic electronic circuit modeling using LTspice<br />
|Beginner<br />
|[[User:Chotee|Chotee]]<br />
|<br />
|Using the LTspice program to model electronic circuits<br />
|-<br />
|Programming in Python<br />
|Beginner / Intermediate<br />
|[[User:Wizzup|Wizzup]]<br />
|[[User:Mi1es|Mi1es]]<br />
|Learing to program using the Python language. <br />
|-<br />
|Arduino 101<br />
|Beginner<br />
|[[User:Julius|Julius]]<br />
|<br />
|Learing to program using the Python language. <br />
|-<br />
|Hacking OpenWRT routers<br />
|???<br />
|[[User:rad0|rad0]]<br />
|<br />
|<br />
|-<br />
|USB Reverse engineering<br />
|Intermediate<br />
|[[User:stef|stef]]<br />
|<br />
|<br />
|-<br />
|Lockpicking<br />
|Beginner<br />
|[[User:muse|muse]]<br />
|<br />
|<br />
|}<br />
<br />
== Skills requested == <br />
List of skills you would want to have that you think Techinc members could give a training in.<br />
<br />
{| class="wikitable"<br />
!Description<br />
!Interested<br />
!Notes<br />
|-<br />
|Laying out PCBs for manufacture<br />
|[[user:Chotee|Chotee]],<br />
|This is not something for absolute electronics beginners. What software to use? Eagle?<br />
|-<br />
|Creating objects for 3d printing<br />
|<br />
|Hands on, not 5 hours of talk.<br />
|-<br />
|Creating designs for laser cutter in Inkscape. <br />
|<br />
|<br />
|}<br />
<br />
== What to expect ==<br />
Workshops are giving my fellow members who want to share their skills or are enthusiastic about something and want to share that. It is not a professional training.</div>Mileshttps://wiki.techinc.nl/index.php?title=The_New_Robot&diff=12057The New Robot2014-05-02T16:04:47Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=MitsubishiMoveMaster.jpg<br />
|ProjectSkills=Soldering, engineering, Electronics, Programming,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
===What we have===<br />
*Metal;<br />
*Two 12 V motors;<br />
*Three 14,7 V LiPo accus, and<br />
*A badass killer robot arm (Mitsubishi Movemaster)<br />
<br />
===Work to do next===<br />
*Make the chassis</div>Mileshttps://wiki.techinc.nl/index.php?title=The_New_Robot&diff=12056The New Robot2014-05-02T16:04:16Z<p>Miles: /* What we have */</p>
<hr />
<div>{{Project<br />
|picture=MitsubishiMoveMaster.jpg<br />
|ProjectSkills=Soldering, engineering, Electronics, Programming,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
===What we have===<br />
*Metal;<br />
*Two 12 V motors;<br />
*Three 14,7 V LiPo accus, and<br />
*A badass killer robot arm (Mitsubishi Movemaster)<br />
<br />
===Work to be done===<br />
*Make the chassis</div>Mileshttps://wiki.techinc.nl/index.php?title=The_New_Robot&diff=11967The New Robot2014-04-23T20:32:10Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=MitsubishiMoveMaster.jpg<br />
|ProjectSkills=Soldering, engineering, Electronics, Programming,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
===What we have===<br />
*Metal;<br />
*Two 12 V motors;<br />
*Three 14,7 V LiPo accus, and<br />
*A badass killer robot arm<br />
<br />
===Work to be done===<br />
*Make the chassis</div>Mileshttps://wiki.techinc.nl/index.php?title=File:MitsubishiMoveMaster.jpg&diff=11966File:MitsubishiMoveMaster.jpg2014-04-23T20:31:51Z<p>Miles: </p>
<hr />
<div></div>Mileshttps://wiki.techinc.nl/index.php?title=The_New_Robot&diff=11862The New Robot2014-04-17T20:07:36Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|ProjectSkills=Soldering, engineering, Electronics, Programming,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
===What we have===<br />
*Metal;<br />
*Two 12 V motors and<br />
*Three 14,7 V LiPo accus.<br />
<br />
===Work to be done===<br />
*Make the chassis</div>Mileshttps://wiki.techinc.nl/index.php?title=The_New_Robot&diff=11860The New Robot2014-04-15T19:33:06Z<p>Miles: Created page with "{{Project |ProjectSkills=Soldering, engineering, Electronics, Programming, |ProjectStatus=Active |ProjectNiche=Electronics |ProjectPurpose=World domination }} We have:
-meta..."</p>
<hr />
<div>{{Project<br />
|ProjectSkills=Soldering, engineering, Electronics, Programming, <br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
We have:<br />
-metal;<br />
-two 12 V motors and<br />
-three 14,7 V LiPo accus.<br />
<br />
Chassis is being made</div>Mileshttps://wiki.techinc.nl/index.php?title=Weekly_Members_Meeting_10&diff=11802Weekly Members Meeting 102014-04-13T19:26:02Z<p>Miles: /* Minutes */</p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=ACTA<br />
|EventType=Meeting<br />
|Contact=Realitygaps, voidz0r<br />
}}<br />
A weekly members meeting for organising things to do with the space. From 5:00pm till 5:30 pm every Sunday.<br />
<br />
<br />
==About Members Meetings==<br />
<br />
* The meetings are 30 minutes long. <br />
<br />
* Items that are discussed for more than 5 minutes will be cut short and discussion can continue after the meeting. <br />
<br />
<br />
==Agenda==<br />
<br />
Add items for the agenda below:<br />
<br />
* Anything that comes up<br />
* Hostinc techinc website<br />
* Haxpo<br />
* Regular food/drink order<br />
* ( your item here )<br />
<br />
==Minutes==<br />
3 Members<br />
<br />
===Anything that comes up===<br />
This agenda point is best had at the end of the agenda, not at the start.<br />
<br />
===Hosting the TechInc website===<br />
Currently looking into colocation options.<br />
We’re looking into colocating with Soleus (association for coloactions).<br />
<br />
===Hack in the Box Haxpo===<br />
Currently Voidz0r and Mi1es are the only one planning to go to the Haxpo. We'll call for more volunteers soon because it's getting close.<br />
<br />
===Regular food and drink order===<br />
Next month (May), Voidz0r will probably order at the AH and hopefully it will rotate.</div>Mileshttps://wiki.techinc.nl/index.php?title=Weekly_Members_Meeting_10&diff=11801Weekly Members Meeting 102014-04-13T19:25:33Z<p>Miles: /* Minutes */</p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=ACTA<br />
|EventType=Meeting<br />
|Contact=Realitygaps, voidz0r<br />
}}<br />
A weekly members meeting for organising things to do with the space. From 5:00pm till 5:30 pm every Sunday.<br />
<br />
<br />
==About Members Meetings==<br />
<br />
* The meetings are 30 minutes long. <br />
<br />
* Items that are discussed for more than 5 minutes will be cut short and discussion can continue after the meeting. <br />
<br />
<br />
==Agenda==<br />
<br />
Add items for the agenda below:<br />
<br />
* Anything that comes up<br />
* Hostinc techinc website<br />
* Haxpo<br />
* Regular food/drink order<br />
* ( your item here )<br />
<br />
==Minutes==<br />
<br />
===Anything that comes up===<br />
This agenda point is best had at the end of the agenda, not at the start.<br />
<br />
===Hosting the TechInc website===<br />
Currently looking into colocation options.<br />
We’re looking into colocating with Soleus (association for coloactions).<br />
<br />
===Hack in the Box Haxpo===<br />
Currently Voidz0r and Mi1es are the only one planning to go to the Haxpo. We'll call for more volunteers soon because it's getting close.<br />
<br />
===Regular food and drink order===<br />
Next month (May), Voidz0r will probably order at the AH and hopefully it will rotate.</div>Mileshttps://wiki.techinc.nl/index.php?title=Weekly_Members_Meeting_10&diff=11794Weekly Members Meeting 102014-04-13T16:07:26Z<p>Miles: </p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=ACTA<br />
|EventType=Meeting<br />
|Contact=Realitygaps, voidz0r<br />
}}<br />
A weekly members meeting for organising things to do with the space. From 5:00pm till 5:30 pm every Sunday.<br />
<br />
<br />
==About Members Meetings==<br />
<br />
* The meetings are 30 minutes long. <br />
<br />
* Items that are discussed for more than 5 minutes will be cut short and discussion can continue after the meeting. <br />
<br />
<br />
==Agenda==<br />
<br />
Add items for the agenda below:<br />
<br />
* Anything that comes up<br />
* Hostinc techinc website<br />
* Haxpo<br />
* Regular food/drink order<br />
* ( your item here )<br />
<br />
<br />
3 members:<br />
Mi1es<br />
Voidz0r<br />
realitygaps<br />
<br />
<br />
Hosting the TechInc website:<br />
Currently looking into colocation options.<br />
We’re looking into colocating with Soleus (association for coloactions).<br />
<br />
Hack in the Box Haxpo:<br />
Currently Voidz0r and Mi1es are the only one planning to go to the Haxpo.<br />
<br />
Regular food and drink order:<br />
Next month (May), Voidz0r will probably order at the AH.<br />
Goal is that every month someone else will do it.</div>Mileshttps://wiki.techinc.nl/index.php?title=Weekly_Members_Meeting_10&diff=11793Weekly Members Meeting 102014-04-13T16:06:13Z<p>Miles: </p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=ACTA<br />
|EventType=Meeting<br />
|Contact=Realitygaps, voidz0r<br />
}}<br />
A weekly members meeting for organising things to do with the space. From 5:00pm till 5:30 pm every Sunday.<br />
<br />
<br />
==About Members Meetings==<br />
<br />
* The meetings are 30 minutes long. <br />
<br />
* Items that are discussed for more than 5 minutes will be cut short and discussion can continue after the meeting. <br />
<br />
<br />
==Agenda==<br />
<br />
Add items for the agenda below:<br />
<br />
* Anything that comes up<br />
* Hostinc techinc website<br />
* Haxpo<br />
* Regular food/drink order<br />
* ( your item here )<br />
<br />
<br />
members meeting 10 - April 13th 2014<br />
——<br />
3.5 members:<br />
Mi1es<br />
Voidz0r<br />
realitygaps<br />
——<br />
<br />
Hosting the TechInc website<br />
Currently looking into colocation options<br />
We’re looking into colocating with Soleus (association for coloactions)<br />
<br />
Hack in the Box Haxpo<br />
Currently Voidz0r and Mi1es are the only one planning to go to the Haxpo.<br />
<br />
Regular food and drink order<br />
Next month (May), Voidz0r will probably order at the AH.<br />
Goal is that every month someone else will do it.</div>Mileshttps://wiki.techinc.nl/index.php?title=KidsWorkshopApril2014&diff=11697KidsWorkshopApril20142014-04-02T22:58:35Z<p>Miles: </p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=(h)ACTA<br />
|EventType=Workshop<br />
|Contact=Becha,<br />
}}<br />
Kids in Space!<br />
<br />
Hacking Workshop for Children<br />
<br />
[[File:01-IMG_3503.JPG|300px|]]<br />
<br />
=Details=<br />
<br />
Date: 13 April, Sunday<br />
<br />
When: 13:00 (1 PM)<br />
<br />
Where: Technologia Incognita Hackerspace, (h)ACTA, Louwesweg 1 (across the street from Slotervaart hospital)<br />
<br />
Who: you and your children! Open to non-members! Ages 6-16 recommended, younger and older also welcome!<br />
<br />
What: basic electronics, making key-chains, 3D printing, T-shirts hacking… <br />
<br />
$$$: entrance & workshops are for free, materials cost small amounts of money, and expected costs for food is 5 Euro per child (pizza, fruit juice, fruit, vegetables, cookies)<br />
<br />
==Registration==<br />
<br />
Registration is recommended!!!!<br />
<br />
* either add yourself to the wiki, before 10. April<br />
* or email BECHA@xs4all.nl , or the orga@techinc.nl <br />
<br />
==RSVP==<br />
<br />
RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP<br />
<br />
[[File:Screen Shot 2014-04-02 at 20.26.09.png|400px]]<br />
<br />
RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP<br />
<br />
We want to know how many people & kids will be present, and how old, so that we can make a better planning.<br />
<br />
If you DO NOT confirm before 10. April, we do not guarantee place on one of the workshops, but you can still visit and take part in ongoing activities - games and demonstrations.<br />
<br />
RSVP: before 10. April<br />
<br />
* either add yourself to the wiki, <br />
* or email BECHA@xs4all.nl , or the orga@techinc.nl <br />
<br />
<br />
<big style="text-shadow: 1px 1px 0px #000;">'''SCHEDULE'''</big><br />
<div style="background:#FFF;color:#000;"><br />
{| class="wikitable"<br />
|&nbsp;13:00&nbsp;<br />
|&nbsp;doors open, intro&nbsp;<br />
|-<br />
|&nbsp;13:30&nbsp;<br />
|&nbsp;first round of workshops&nbsp;<br />
|-<br />
|&nbsp;14:30&nbsp;<br />
|&nbsp;BREAK&nbsp;<br />
|-<br />
|&nbsp;15:00&nbsp;<br />
|&nbsp;second round of workshops&nbsp;<br />
|}<br />
<br />
=ACTIVITIES=<br />
<br />
{{DISPLAYTITLE:<span style="display:none"></span>}}<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="clear:right; width:750px; margin:5px 0 1em 1em; border:solid 1px; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:hide" class="wikitable"<br />
|- <br />
| <b>Area</b><br />
| <b>TIME </b><br />
| <b>ACTIVITY</B><br />
| Age group, Number of kids<br />
| Who is the instructor <br />
|-<br />
|- <br />
| All areas<br />
| 13:00 - 13:30<br />
| Introductions, name stickers, choosing activity<br />
| ALL kids<br />
| all instructors<br />
|-<br />
| Small table<br />
| <br />
| GAMES / Spelletjes<br />
| Up to 6 kids<br />
| Instructor: <br />
|- <br />
| Electronics table<br />
| 13:30 - 14:30 <br />
| Bristle bots or rainbow kits (soldering) <br />
| 6-10 years, Group of 4 kids<br />
| Instructor: Mi1es<br />
|-<br />
| 3D-printers<br />
| <br />
| Designing 3D printed "thing"<br />
| 6-10 years; 2 kids only!<br />
| Instructor: Voidz0r<br />
|-<br />
| Big table in AUX room<br />
| <br />
| ????<br />
| 5-12 years ; Group of 4 kids<br />
| Instructor: ???? <br />
|- <br />
| AV station <br />
| <br />
| Virtual Reality / Oculus Rift glasses<br />
| 4-8 years : Group of 4 kids<br />
| cmpxch<br />
|- <br />
| <b>BREAK</b><br />
| 14:30 - 15:00<br />
| FOOD: pizza? cupcakes? waffles? <br />
| ALL kids<br />
| all instructors<br />
|-<br />
| 2nd round of workshops!!!<br />
| 15:00 - 17:00<br />
| <br />
| <br />
| <br />
|-<br />
|<br />
| <br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=Who=<br />
<br />
==Participants==<br />
<br />
===Confirmed===<br />
* Becha (Alisa 10, Charlie 8) <br />
* Nana (Iris 7, Lara 4) <br />
* Andreas (Vincent 6, Kaya 4, possibly: David 7)<br />
<br />
===Not sure===<br />
<br />
* Chottee <br />
* Etienne (Meta 10, Roald 8)<br />
<br />
==Volunteers==<br />
<br />
{| class="wikitable sortable"<br />
|-<br />
!What<br />
!Who<br />
|-<br />
|-<br />
| Door Opening Executive<br />
| ???<br />
|-<br />
| Laser cutting<br />
| ???<br />
|-<br />
| Chief Photographer <br />
| <br />
|-<br />
| Pizza Chef<br />
|<br />
|-<br />
| Snacks Master or Misstress <br />
| <br />
|-<br />
| Coffee Wizzard and Tea Witch<br />
|<br />
|}<br />
<br />
== Instructors==<br />
<br />
* cmpxchg: VR glasses <br />
* Voidz0r: 3D printing <br />
* Becha: logistics, stickers, introductions <br />
* Mi1es: Soldering<br />
<br />
===Still needed===<br />
<br />
* Laser cutting<br />
* Knutselen<br />
<br />
=Flyer=<br />
<br />
http://becha.home.xs4all.nl/KIDS_IN_SPACE_march_april.pdf<br />
<br />
=PHOTOS=<br />
<br />
See photos from previous workshops: <br />
<br />
== March == <br />
<br />
[[KidsWorkshopMar2014#Photos]] <br />
<br />
<gallery perrow=6><br />
<br />
Image:01-IMG_3503.JPG <br />
<br />
Image:02-IMG_3500.JPG<br />
<br />
Image:04-IMG_3498.JPG<br />
<br />
Image:05-IMG_3494.jpg<br />
<br />
Image:06-IMG_3523.jpg<br />
<br />
Image:07-IMG_3496.jpg<br />
<br />
Image:08-IMG_3497.jpg<br />
<br />
Image:09-IMG_3493.JPG<br />
<br />
Image:10-IMG_3505.JPG<br />
<br />
Image:11-IMG_3501.JPG<br />
<br />
Image:12-IMG_3502.JPG<br />
<br />
<br />
Image:13-IMG_3509.JPG<br />
<br />
Image:14-IMG_3512.JPG<br />
<br />
Image:15-IMG_3514.JPG<br />
<br />
Image:16-IMG_3515.JPG<br />
<br />
Image:17-IMG_3517.JPG<br />
<br />
Image:18-IMG_3511.jpg<br />
<br />
Image:19-IMG_3524.jpg<br />
<br />
Image:03-IMG_3513.JPG<br />
<br />
<br />
Image:20-IMG_3521.jpg<br />
<br />
Image:21-IMG_3518.JPG<br />
<br />
Image:22-IMG_3519.JPG<br />
<br />
Image:23-IMG_3520.JPG<br />
<br />
</gallery><br />
<br />
<br />
<br />
== February == <br />
<br />
[[KidsWorkshopFeb2014#Photos]]<br />
<br />
<gallery perrow=6><br />
<br />
Image:activity_IMG_3440.JPG <br />
<br />
T-shirts versieren <br />
<br />
Image:activity_IMG_3442.JPG <br />
<br />
Vliegers maken <br />
<br />
Image:activity_IMG_3446.JPG<br />
<br />
Bristlebots maken<br />
<br />
Image:activity_IMG_3445.JPG<br />
<br />
LED throwies <br />
<br />
Image:activity_IMG_3447.JPG<br />
<br />
Speletjes spelen :) <br />
<br />
Image:activity_IMG_3458.JPG<br />
<br />
Solderen! door Mila & Jamie <br />
<br />
<br />
</gallery><br />
<gallery perrow=6><br />
<br />
T-shirt door Iris<br />
<br />
Image:result_IMG_3450.JPG<br />
<br />
T-shirt door Alisa <br />
<br />
Image:result_IMG_3480.JPG<br />
<br />
Haarband door Lara<br />
<br />
Image:result_IMG_3462.JPG<br />
<br />
Brisltebot by George<br />
<br />
Image:result_IMG_3481.JPG<br />
<br />
Vlieger by Esther <br />
<br />
Image:result_IMG_3467.JPG<br />
<br />
Photos kijken<br />
<br />
Image:activity_IMG_3476.JPG<br />
<br />
</gallery></div>Mileshttps://wiki.techinc.nl/index.php?title=KidsWorkshopApril2014&diff=11695KidsWorkshopApril20142014-04-02T22:57:05Z<p>Miles: /* ACTIVITIES */</p>
<hr />
<div>{{Event<br />
|Date=2014/04/13<br />
|Location=(h)ACTA<br />
|EventType=Workshop<br />
|Contact=Becha,<br />
}}<br />
Kids in Space!<br />
<br />
Hacking Workshop for Children<br />
<br />
[[File:01-IMG_3503.JPG|300px|]]<br />
<br />
=Details=<br />
<br />
Date: 13 April, Sunday<br />
<br />
When: 13:00 (1 PM)<br />
<br />
Where: Technologia Incognita Hackerspace, (h)ACTA, Louwesweg 1 (across the street from Slotervaart hospital)<br />
<br />
Who: you and your children! Open to non-members! Ages 6-16 recommended, younger and older also welcome!<br />
<br />
What: basic electronics, making key-chains, 3D printing, T-shirts hacking… <br />
<br />
$$$: entrance & workshops are for free, materials cost small amounts of money, and expected costs for food is 5 Euro per child (pizza, fruit juice, fruit, vegetables, cookies)<br />
<br />
==Registration==<br />
<br />
Registration is recommended!!!!<br />
<br />
* either add yourself to the wiki, before 10. April<br />
* or email BECHA@xs4all.nl , or the orga@techinc.nl <br />
<br />
==RSVP==<br />
<br />
RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP<br />
<br />
[[File:Screen Shot 2014-04-02 at 20.26.09.png|400px]]<br />
<br />
RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP***RSVP<br />
<br />
We want to know how many people & kids will be present, and how old, so that we can make a better planning.<br />
<br />
If you DO NOT confirm before 10. April, we do not guarantee place on one of the workshops, but you can still visit and take part in ongoing activities - games and demonstrations.<br />
<br />
RSVP: before 10. April<br />
<br />
* either add yourself to the wiki, <br />
* or email BECHA@xs4all.nl , or the orga@techinc.nl <br />
<br />
<br />
<big style="text-shadow: 1px 1px 0px #000;">'''SCHEDULE'''</big><br />
<div style="background:#FFF;color:#000;"><br />
{| class="wikitable"<br />
|&nbsp;13:00&nbsp;<br />
|&nbsp;doors open, intro&nbsp;<br />
|-<br />
|&nbsp;13:30&nbsp;<br />
|&nbsp;first round of workshops&nbsp;<br />
|-<br />
|&nbsp;14:30&nbsp;<br />
|&nbsp;BREAK&nbsp;<br />
|-<br />
|&nbsp;15:00&nbsp;<br />
|&nbsp;second round of workshops&nbsp;<br />
|}<br />
<br />
=ACTIVITIES=<br />
<br />
{{DISPLAYTITLE:<span style="display:none"></span>}}<br />
<br />
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="clear:right; width:750px; margin:5px 0 1em 1em; border:solid 1px; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:hide" class="wikitable"<br />
|- <br />
| <b>Area</b><br />
| <b>TIME </b><br />
| <b>ACTIVITY</B><br />
| Age group, Number of kids<br />
| Who is the instructor <br />
|-<br />
|- <br />
| All areas<br />
| 13:00 - 13:30<br />
| Introductions, name stickers, choosing activity<br />
| ALL kids<br />
| all instructors<br />
|-<br />
| Small table<br />
| <br />
| GAMES / Spelletjes<br />
| Up to 6 kids<br />
| Instructor: <br />
|- <br />
| Electronics table<br />
| 13:30 - 14:30 <br />
| Bristle bots or rainbow kits (soldering) <br />
| 6-10 years, Group of 4 kids<br />
| Instructor: Mi1es<br />
|-<br />
| 3D-printers<br />
| <br />
| Designing 3D printed "thing"<br />
| 6-10 years; 2 kids only!<br />
| Instructor: Voidz0r<br />
|-<br />
| Big table in AUX room<br />
| <br />
| ????<br />
| 5-12 years ; Group of 4 kids<br />
| Instructor: ???? <br />
|- <br />
| AV station <br />
| <br />
| Virtual Reality / Oculus Rift glasses<br />
| 4-8 years : Group of 4 kids<br />
| cmpxch<br />
|- <br />
| <b>BREAK</b><br />
| 14:30 - 15:00<br />
| FOOD: pizza? cupcakes? waffles? <br />
| ALL kids<br />
| all instructors<br />
|-<br />
| 2nd round of workshops!!!<br />
| 15:00 - 17:00<br />
| <br />
| <br />
| <br />
|-<br />
|<br />
| <br />
|<br />
|<br />
|-<br />
|}<br />
<br />
=Who=<br />
<br />
==Participants==<br />
<br />
===Confirmed===<br />
* Becha (Alisa 10, Charlie 8) <br />
* Nana (Iris 7, Lara 4) <br />
* Andreas (Vincent 6, Kaya 4, possibly: David 7)<br />
<br />
===Not sure===<br />
<br />
* Chottee <br />
* Etienne (Meta 10, Roald 8)<br />
<br />
==Volunteers==<br />
<br />
{| class="wikitable sortable"<br />
|-<br />
!What<br />
!Who<br />
|-<br />
|-<br />
| Door Opening Executive<br />
| ???<br />
|-<br />
| Laser cutting<br />
| ???<br />
|-<br />
| Chief Photographer <br />
| <br />
|-<br />
| Pizza Chef<br />
|<br />
|-<br />
| Snacks Master or Misstress <br />
| <br />
|-<br />
| Coffee Wizzard and Tea Witch<br />
|<br />
|}<br />
<br />
== Instructors==<br />
<br />
* cmpxchg: VR glasses <br />
* Voidz0r: 3D printing <br />
* Becha: logistics, stickers, introductions <br />
<br />
===Still needed===<br />
<br />
* Soldering<br />
* Laser cutting<br />
* Knutselen<br />
<br />
=Flyer=<br />
<br />
http://becha.home.xs4all.nl/KIDS_IN_SPACE_march_april.pdf<br />
<br />
=PHOTOS=<br />
<br />
See photos from previous workshops: <br />
<br />
== March == <br />
<br />
[[KidsWorkshopMar2014#Photos]] <br />
<br />
<gallery perrow=6><br />
<br />
Image:01-IMG_3503.JPG <br />
<br />
Image:02-IMG_3500.JPG<br />
<br />
Image:04-IMG_3498.JPG<br />
<br />
Image:05-IMG_3494.jpg<br />
<br />
Image:06-IMG_3523.jpg<br />
<br />
Image:07-IMG_3496.jpg<br />
<br />
Image:08-IMG_3497.jpg<br />
<br />
Image:09-IMG_3493.JPG<br />
<br />
Image:10-IMG_3505.JPG<br />
<br />
Image:11-IMG_3501.JPG<br />
<br />
Image:12-IMG_3502.JPG<br />
<br />
<br />
Image:13-IMG_3509.JPG<br />
<br />
Image:14-IMG_3512.JPG<br />
<br />
Image:15-IMG_3514.JPG<br />
<br />
Image:16-IMG_3515.JPG<br />
<br />
Image:17-IMG_3517.JPG<br />
<br />
Image:18-IMG_3511.jpg<br />
<br />
Image:19-IMG_3524.jpg<br />
<br />
Image:03-IMG_3513.JPG<br />
<br />
<br />
Image:20-IMG_3521.jpg<br />
<br />
Image:21-IMG_3518.JPG<br />
<br />
Image:22-IMG_3519.JPG<br />
<br />
Image:23-IMG_3520.JPG<br />
<br />
</gallery><br />
<br />
<br />
<br />
== February == <br />
<br />
[[KidsWorkshopFeb2014#Photos]]<br />
<br />
<gallery perrow=6><br />
<br />
Image:activity_IMG_3440.JPG <br />
<br />
T-shirts versieren <br />
<br />
Image:activity_IMG_3442.JPG <br />
<br />
Vliegers maken <br />
<br />
Image:activity_IMG_3446.JPG<br />
<br />
Bristlebots maken<br />
<br />
Image:activity_IMG_3445.JPG<br />
<br />
LED throwies <br />
<br />
Image:activity_IMG_3447.JPG<br />
<br />
Speletjes spelen :) <br />
<br />
Image:activity_IMG_3458.JPG<br />
<br />
Solderen! door Mila & Jamie <br />
<br />
<br />
</gallery><br />
<gallery perrow=6><br />
<br />
T-shirt door Iris<br />
<br />
Image:result_IMG_3450.JPG<br />
<br />
T-shirt door Alisa <br />
<br />
Image:result_IMG_3480.JPG<br />
<br />
Haarband door Lara<br />
<br />
Image:result_IMG_3462.JPG<br />
<br />
Brisltebot by George<br />
<br />
Image:result_IMG_3481.JPG<br />
<br />
Vlieger by Esther <br />
<br />
Image:result_IMG_3467.JPG<br />
<br />
Photos kijken<br />
<br />
Image:activity_IMG_3476.JPG<br />
<br />
</gallery></div>Mileshttps://wiki.techinc.nl/index.php?title=Cut/Displaying_Rules_in_the_space&diff=11604Cut/Displaying Rules in the space2014-03-30T18:19:38Z<p>Miles: </p>
<hr />
<div>{{Papercut<br />
|PapercutStatus=Done<br />
|PapercutType=Other<br />
|Contact=User:Amx109<br />
}}<br />
the rules should be printed and put up in appropriate places<br />
<br />
==See also==<br />
* [[Office_Space]]</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=11595French FX-7 robot2014-03-29T15:22:26Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=Robots.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
IT MOVES!<br />
<br />
== Overview ==<br />
== System ==<br />
The robot has a total of 5 motors of which 4 are capable of being driven into either direction. These control the tank-tracks , the hip and the arm. The fifth motor spins a gear that winds up a spring and launches one of the three darts that are loaded in the chest-magazine.<br />
<br />
For purposes of clarity, we've numbered the motors accordingly:<br />
<br />
* Motor 1 = Left Track<br />
* Motor 2 = Right Track<br />
* Motor 3 = Hip<br />
* Motor 4 = Arms<br />
* Motor 5 = Dart-gun<br />
<br />
The first four motors are driven using an full H-bridge arrangement using 4 'big' transistors and two small-signal transistors arranged in such a way that the whole H-bridge can be driven with just 2 lines from a microcontroller; assuring that the right 'opposite transistors' get activated when given a 'HIGH' signal.<br />
<br />
The last motor is a bit of an enigma. The arrangement of the transistors is very unclear; but it should be trivial to drive it with a FET or a darlington.<br />
<br />
Next to the motors, the system has a plethora of red LEDs in it's visor, as well as two 'headlights' on either side that switch on when given a command in it's original configuration.<br />
<br />
There is also a speaker that is used for indicating which command's it's been given. Primarily for the purposes of reporting that it's closing or opening it's arms or commencing shooting. It also allows/allowed the operator to speak into the remote-control and have his/her voice be produced from this speaker.<br />
<br />
== New plan with the Carambola2==<br />
<br />
The motor-driver board now has a Carambola2 device directly mounted onto it. The board gets power via an LM7805-based power-supply which regulates the power coming from the LithiumPolymer battery and makes the system fully self-contained.<br />
<br />
The nice thing about the Carambola2 is that it has onboard WIFI and allows easy remote control this way; as well as having all the GPIO niceties that you might wish for.<br />
Sadly, the SPI-bus on the device is not easily usable by default without a bit of kernel-work. It has been decided that it'd be easier to just re-wire things to use the GPIO's individually; it has enough of them available.<br />
<br />
<br />
=== Controlling the device ===<br />
<br />
THe device has been configured to use Bonjour to announce itself as 'milobot.local' and be reachable on account 'root'. Password is known to the right people.<br />
<br />
Driving the GPIO's is rather easy. It requires a few preparatory steps:<br />
For example GPIO15<br />
<br />
* Export the pin using 'echo 15 > /sys/class/gpio/export'<br />
* This will create/enable the directory '/sys/class/gpio/gpio15'<br />
* Configure the pin direction (input/output) 'echo out > /sys/class/gpio/gpio15/direction'<br />
* Configure the pin state to 'off' 'echo 0 > /sys/class/gpi0/gpio15/value'<br />
<br />
* Setting the pin to 'on' state involves writing a '1' to the 'value' in the last step.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
<br />
=== Work done ===<br />
<br />
* All the GPIO's have been connected and tested to drive the H-Bridges correctly<br />
* Status LED's have been soldered next to each output to be able to debug issues with motor, output/etc.<br />
** Green = Forward<br />
** Red = Backward<br />
* A bash-programs have been produced to allow initializing the GPIO's as well as controlling each of the first 4 motor drivers using single keys.<br />
* A rewrite has been made that cleans up some code ; requires testing, however.<br />
* Layout improvements<br />
<br />
=== Work to be done ===<br />
<br />
* It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
** THIS HAS ALREADY BEEN DONE WITH BASH; BUT PYTHON/ANYTHING_USEFUL WOULD BE BETTER*<br />
* Note: we are lacking Python/perl/whatever on this thing. We need to find out how to install stuff on OpenWRT<br />
* Add a fuse between the power-connector and the rest of the circuit.<br />
* Pins 23,22,21,20,19,18,17,16,15,1 can be used as GPIO. Some (like 17 for example) may be on at startup, wich is not very useful. We need to find out how to change this.<br />
<br />
=== Programs ====<br />
==== Original 'initialize.sh' ====<br />
<pre><br />
<br />
#!/bin/sh<br />
<br />
for i in 15 16 18 19 20 21 22 23<br />
do <br />
echo Initializing Pin $i<br />
echo Export pin $i<br />
echo $i > /sys/class/gpio/export<br />
echo Set direction to output for gpio$i<br />
echo out > /sys/class/gpio/gpio$i/direction<br />
echo Clearing state to zero on gpio$i<br />
echo 0 > /sys/class/gpio/gpio$i/value<br />
done<br />
</pre><br />
<br />
==== original 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q, a, z = left<br />
# w,s,x = right<br />
<br />
<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
echo 1 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 1 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
echo 1 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards'; <br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 1 > /sys/class/gpio/gpio19/value;<br />
<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
echo 1 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 1 > /sys/class/gpio/gpio21/value;<br />
<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close'; <br />
echo 1 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 1 > /sys/class/gpio/gpio23/value;<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP'; <br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
exit<br />
else <br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== 'command.sh' 2.0 ====<br />
This one contains help, initialization in one go. Cleaned up a bit using a function for GPIO toggling and has some help-text.<br />
<br />
To be done: <br />
* suppress local echo of pressed key<br />
* write action on fixed spot<br />
* Provide status-map of motors above the bottom line; update it on change.<br />
<br />
For now, it first needs testing.. it seems like it should work.<br />
<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
<br />
<br />
base="/sys/class/gpio"<br />
ports='15 16 18 19 20 21 22 23'<br />
<br />
function gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo 'GPIO$i not initialized; exporting and configuring as output'<br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0<br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 15 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1<br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0<br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0<br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1<br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== Newest 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
# t,g = shoot (start/stop)<br />
<br />
base="/sys/class/gpio"<br />
ports='1 15 16 18 19 20 21 22 23'<br />
<br />
gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo "GPIO$i not initialized; exporting and configuring as output" <br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Gun : t, g"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0 <br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 16 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1 <br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0 <br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0 <br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1 <br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
<br />
elif [ "$KEY" == 't' ]; then<br />
echo 'Gun Shoot';<br />
gpio 1 1<br />
elif [ "$KEY" == 'g' ]; then<br />
echo 'Gun Stop';<br />
gpio 1 0<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
== Abandoned ideas ==<br />
=== Direct Drive control via RaspPI ===<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Original 'direct drive' Layout was as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
=== 'Direct Drive' Python code ===<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
</pre><br />
<br />
<pre><br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
</pre><br />
<br />
<br />
With this code-shim you can test the function of your code even without having RPi.GPIO loaded (like on most PC's)<br />
Note it doesnt implement all things yet; but enough to work for this project currently.<br />
Working on a shift-register help-library<br />
<br />
<br />
<pre><br />
class FAKEGPIO:<br />
def __init__(self):<br />
self.BOARD=1<br />
self.OUT=0<br />
self.IN=1<br />
def setmode(self,variant):<br />
print "Call: setmode: variant -> " + str(variant)<br />
def setup(self,pin, type):<br />
print "Call: setup : pin -> " + str(pin) + ", type -> " + str(type)<br />
def output(self,pin,state):<br />
print "Out:" + str(pin) + "-> " + str(state)<br />
<br />
gpio = FAKEGPIO()<br />
</pre><br />
<br />
== Shift-Register driving of robot ==<br />
<br />
Since the RaspPI doesnt have much IO and the robot requires 8 output-pins just for the basic motor-control already, we've started looking at driving the outputs using shift-registers instead.<br />
<br />
The proto-board has been re-wired to have two shift-registers hosted on it, connected in series, for a total of 16 outputs.<br />
<br />
The shift-registers in question are the 74HCT595's that has an 8-bit serial register controlled by 'data' and 'clock' lines, and an 8-bit parallel 'latch' that is controlled by a separate line; allowing you to control at which moment the 8 output pins (output A-H) should reflect the state of the internal 8-bit serial register.<br />
<br />
By having the parallel register in between the outputs and the serially controlled register, you are able to change the contents of the serial register at your own leisure without the outputs directly following your changes.<br />
<br />
The last control-lines on the 74HCT595 are a 'master reset' pin (active LOW; so connect to HIGH if unused) and a 'Chip enable' (active LOW, connect to GND if not used)<br />
<br />
<br />
The motor-pins are connected to the first of the two shift-registers; this means that the last 8 bits of data shifted into the 16 bit register-space controls the motors as the first bit shifted in ends up being at the last-most position after 16 clock-cycles.<br />
<br />
<br />
{| class="wikitable"<br />
!colspan="6"|Shift-register layout<br />
|-<br />
! align="left"| Register<br />
! align="left"| Bit<br />
! align="left"| Motor<br />
! align="left"| Direction<br />
|-<br />
|rowspan=8| 1<br />
|0<br />
|Left Tread<br />
|Forwards<br />
|-<br />
|1<br />
|Left Tread<br />
|Backwards<br />
|-<br />
|2<br />
|Right Tread<br />
|Forwards<br />
|-<br />
|3<br />
|Right Tread<br />
|Backwards<br />
|-<br />
|4<br />
|Hip<br />
|Forwards<br />
|-<br />
|5<br />
|Hip<br />
|Backwards<br />
|-<br />
|6<br />
|Arms<br />
|Open<br />
|-<br />
|7<br />
|Arms<br />
|Close<br />
|-<br />
|rowspan="8"|2<br />
|0<br />
|TBD<br />
|TBD<br />
|-<br />
|1<br />
|TBD<br />
|TBD<br />
|-<br />
|2<br />
|TBD<br />
|TBD<br />
|-<br />
|3<br />
|TBD<br />
|TBD<br />
|-<br />
|4<br />
|TBD<br />
|TBD<br />
|-<br />
|5<br />
|TBD<br />
|TBD<br />
|-<br />
|6<br />
|TBD<br />
|TBD<br />
|-<br />
|7<br />
|TBD<br />
|TBD<br />
|}<br />
<br />
=== Software Side ===<br />
<br />
To drive the shift-register, two approaches can be used. Either full 'software bit-banging' or using the SPI-bus on the Raspberry PI to drive (at least) the clock, enable and data-lines of the shift-register. The 'latch' pin of the register needs to be bit-banged as there seems to be no easy way to pull this off with just SPI (unless.. perhaps, doing something smart with the 'enable' line..)<br />
<br />
<br />
The pure bit-bang approach could use any 3 or 4 GPIO pins on the PI, using the work done on https://projects.drogon.net/raspberry-pi/gpio-examples/ as already used and listed above.<br />
<br />
The SPI approach could use the work done on http://www.100randomtasks.com/simple-spi-on-raspberry-pi.<br />
<br />
An example snippet of code could be<br />
<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
impport spidev<br />
<br />
gpio.setmode(GPIO.BOARD)<br />
gpio.setup(12,GPIO.OUT)<br />
gpio.output(12,False)<br />
<br />
spi = spidev.SpiDev()<br />
spi.open(0,0)<br />
while True:<br />
resp = spi.xfer2([0x5555])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
resp = spi.xfer2([0xAAAA])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
</pre><br />
<br />
This will import the right libs, setup pin 12 as the 'latch' pin, initialize the SPI-bus using CE0 as the chip-enable line (open(0,0)), and then write a 0x5555 value to the SPI-bus; two bytes, aka 16 bits. 0x5555 and 0xAAAA are eachothers complements; an alternating pattern of 0 and 1's, starting either with a 0 (0x5555) or a 1 (0xAAAA). The 'resp' variable will be loaded with whatever comes back in on the input at the same time; if you connect MOSI to MISO , you will normally read the same thing you are writing out. You can also connect the H' pin of register2 to MISO; this will allow you to read the PREVIOUS state of the shift-registers back... for no useful reason, however.<br />
<br />
Toggling pin 12 up and down should trigger the parallel latch to take the contents of the serial latch and adjust the outputs and then make it safe to adjust the serial register again for the next update.</div>Mileshttps://wiki.techinc.nl/index.php?title=File:Robots.jpg&diff=11594File:Robots.jpg2014-03-29T15:22:19Z<p>Miles: </p>
<hr />
<div></div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=11558French FX-7 robot2014-03-28T23:10:33Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
IT MOVES!<br />
<br />
== Overview ==<br />
== System ==<br />
The robot has a total of 5 motors of which 4 are capable of being driven into either direction. These control the tank-tracks , the hip and the arm. The fifth motor spins a gear that winds up a spring and launches one of the three darts that are loaded in the chest-magazine.<br />
<br />
For purposes of clarity, we've numbered the motors accordingly:<br />
<br />
* Motor 1 = Left Track<br />
* Motor 2 = Right Track<br />
* Motor 3 = Hip<br />
* Motor 4 = Arms<br />
* Motor 5 = Dart-gun<br />
<br />
The first four motors are driven using an full H-bridge arrangement using 4 'big' transistors and two small-signal transistors arranged in such a way that the whole H-bridge can be driven with just 2 lines from a microcontroller; assuring that the right 'opposite transistors' get activated when given a 'HIGH' signal.<br />
<br />
The last motor is a bit of an enigma. The arrangement of the transistors is very unclear; but it should be trivial to drive it with a FET or a darlington.<br />
<br />
Next to the motors, the system has a plethora of red LEDs in it's visor, as well as two 'headlights' on either side that switch on when given a command in it's original configuration.<br />
<br />
There is also a speaker that is used for indicating which command's it's been given. Primarily for the purposes of reporting that it's closing or opening it's arms or commencing shooting. It also allows/allowed the operator to speak into the remote-control and have his/her voice be produced from this speaker.<br />
<br />
== New plan with the Carambola2==<br />
<br />
The motor-driver board now has a Carambola2 device directly mounted onto it. The board gets power via an LM7805-based power-supply which regulates the power coming from the LithiumPolymer battery and makes the system fully self-contained.<br />
<br />
The nice thing about the Carambola2 is that it has onboard WIFI and allows easy remote control this way; as well as having all the GPIO niceties that you might wish for.<br />
Sadly, the SPI-bus on the device is not easily usable by default without a bit of kernel-work. It has been decided that it'd be easier to just re-wire things to use the GPIO's individually; it has enough of them available.<br />
<br />
<br />
=== Controlling the device ===<br />
<br />
THe device has been configured to use Bonjour to announce itself as 'milobot.local' and be reachable on account 'root'. Password is known to the right people.<br />
<br />
Driving the GPIO's is rather easy. It requires a few preparatory steps:<br />
For example GPIO15<br />
<br />
* Export the pin using 'echo 15 > /sys/class/gpio/export'<br />
* This will create/enable the directory '/sys/class/gpio/gpio15'<br />
* Configure the pin direction (input/output) 'echo out > /sys/class/gpio/gpio15/direction'<br />
* Configure the pin state to 'off' 'echo 0 > /sys/class/gpi0/gpio15/value'<br />
<br />
* Setting the pin to 'on' state involves writing a '1' to the 'value' in the last step.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
<br />
=== Work done ===<br />
<br />
* All the GPIO's have been connected and tested to drive the H-Bridges correctly<br />
* Status LED's have been soldered next to each output to be able to debug issues with motor, output/etc.<br />
** Green = Forward<br />
** Red = Backward<br />
* A bash-programs have been produced to allow initializing the GPIO's as well as controlling each of the first 4 motor drivers using single keys.<br />
* A rewrite has been made that cleans up some code ; requires testing, however.<br />
* Layout improvements<br />
<br />
=== Work to be done ===<br />
<br />
* It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
** THIS HAS ALREADY BEEN DONE WITH BASH; BUT PYTHON/ANYTHING_USEFUL WOULD BE BETTER*<br />
* Note: we are lacking Python/perl/whatever on this thing. We need to find out how to install stuff on OpenWRT<br />
* Add a fuse between the power-connector and the rest of the circuit.<br />
* Pins 23,22,21,20,19,18,17,16,15,1 can be used as GPIO. Some (like 17 for example) may be on at startup, wich is not very useful. We need to find out how to change this.<br />
<br />
=== Programs ====<br />
==== Original 'initialize.sh' ====<br />
<pre><br />
<br />
#!/bin/sh<br />
<br />
for i in 15 16 18 19 20 21 22 23<br />
do <br />
echo Initializing Pin $i<br />
echo Export pin $i<br />
echo $i > /sys/class/gpio/export<br />
echo Set direction to output for gpio$i<br />
echo out > /sys/class/gpio/gpio$i/direction<br />
echo Clearing state to zero on gpio$i<br />
echo 0 > /sys/class/gpio/gpio$i/value<br />
done<br />
</pre><br />
<br />
==== original 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q, a, z = left<br />
# w,s,x = right<br />
<br />
<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
echo 1 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 1 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
echo 1 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards'; <br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 1 > /sys/class/gpio/gpio19/value;<br />
<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
echo 1 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 1 > /sys/class/gpio/gpio21/value;<br />
<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close'; <br />
echo 1 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 1 > /sys/class/gpio/gpio23/value;<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP'; <br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
exit<br />
else <br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== 'command.sh' 2.0 ====<br />
This one contains help, initialization in one go. Cleaned up a bit using a function for GPIO toggling and has some help-text.<br />
<br />
To be done: <br />
* suppress local echo of pressed key<br />
* write action on fixed spot<br />
* Provide status-map of motors above the bottom line; update it on change.<br />
<br />
For now, it first needs testing.. it seems like it should work.<br />
<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
<br />
<br />
base="/sys/class/gpio"<br />
ports='15 16 18 19 20 21 22 23'<br />
<br />
function gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo 'GPIO$i not initialized; exporting and configuring as output'<br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0<br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 15 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1<br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0<br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0<br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1<br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== Newest 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
# t,g = shoot (start/stop)<br />
<br />
base="/sys/class/gpio"<br />
ports='1 15 16 18 19 20 21 22 23'<br />
<br />
gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo "GPIO$i not initialized; exporting and configuring as output" <br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Gun : t, g"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0 <br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 16 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1 <br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0 <br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0 <br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1 <br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
<br />
elif [ "$KEY" == 't' ]; then<br />
echo 'Gun Shoot';<br />
gpio 1 1<br />
elif [ "$KEY" == 'g' ]; then<br />
echo 'Gun Stop';<br />
gpio 1 0<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
== Abandoned ideas ==<br />
=== Direct Drive control via RaspPI ===<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Original 'direct drive' Layout was as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
=== 'Direct Drive' Python code ===<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
</pre><br />
<br />
<pre><br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
</pre><br />
<br />
<br />
With this code-shim you can test the function of your code even without having RPi.GPIO loaded (like on most PC's)<br />
Note it doesnt implement all things yet; but enough to work for this project currently.<br />
Working on a shift-register help-library<br />
<br />
<br />
<pre><br />
class FAKEGPIO:<br />
def __init__(self):<br />
self.BOARD=1<br />
self.OUT=0<br />
self.IN=1<br />
def setmode(self,variant):<br />
print "Call: setmode: variant -> " + str(variant)<br />
def setup(self,pin, type):<br />
print "Call: setup : pin -> " + str(pin) + ", type -> " + str(type)<br />
def output(self,pin,state):<br />
print "Out:" + str(pin) + "-> " + str(state)<br />
<br />
gpio = FAKEGPIO()<br />
</pre><br />
<br />
== Shift-Register driving of robot ==<br />
<br />
Since the RaspPI doesnt have much IO and the robot requires 8 output-pins just for the basic motor-control already, we've started looking at driving the outputs using shift-registers instead.<br />
<br />
The proto-board has been re-wired to have two shift-registers hosted on it, connected in series, for a total of 16 outputs.<br />
<br />
The shift-registers in question are the 74HCT595's that has an 8-bit serial register controlled by 'data' and 'clock' lines, and an 8-bit parallel 'latch' that is controlled by a separate line; allowing you to control at which moment the 8 output pins (output A-H) should reflect the state of the internal 8-bit serial register.<br />
<br />
By having the parallel register in between the outputs and the serially controlled register, you are able to change the contents of the serial register at your own leisure without the outputs directly following your changes.<br />
<br />
The last control-lines on the 74HCT595 are a 'master reset' pin (active LOW; so connect to HIGH if unused) and a 'Chip enable' (active LOW, connect to GND if not used)<br />
<br />
<br />
The motor-pins are connected to the first of the two shift-registers; this means that the last 8 bits of data shifted into the 16 bit register-space controls the motors as the first bit shifted in ends up being at the last-most position after 16 clock-cycles.<br />
<br />
<br />
{| class="wikitable"<br />
!colspan="6"|Shift-register layout<br />
|-<br />
! align="left"| Register<br />
! align="left"| Bit<br />
! align="left"| Motor<br />
! align="left"| Direction<br />
|-<br />
|rowspan=8| 1<br />
|0<br />
|Left Tread<br />
|Forwards<br />
|-<br />
|1<br />
|Left Tread<br />
|Backwards<br />
|-<br />
|2<br />
|Right Tread<br />
|Forwards<br />
|-<br />
|3<br />
|Right Tread<br />
|Backwards<br />
|-<br />
|4<br />
|Hip<br />
|Forwards<br />
|-<br />
|5<br />
|Hip<br />
|Backwards<br />
|-<br />
|6<br />
|Arms<br />
|Open<br />
|-<br />
|7<br />
|Arms<br />
|Close<br />
|-<br />
|rowspan="8"|2<br />
|0<br />
|TBD<br />
|TBD<br />
|-<br />
|1<br />
|TBD<br />
|TBD<br />
|-<br />
|2<br />
|TBD<br />
|TBD<br />
|-<br />
|3<br />
|TBD<br />
|TBD<br />
|-<br />
|4<br />
|TBD<br />
|TBD<br />
|-<br />
|5<br />
|TBD<br />
|TBD<br />
|-<br />
|6<br />
|TBD<br />
|TBD<br />
|-<br />
|7<br />
|TBD<br />
|TBD<br />
|}<br />
<br />
=== Software Side ===<br />
<br />
To drive the shift-register, two approaches can be used. Either full 'software bit-banging' or using the SPI-bus on the Raspberry PI to drive (at least) the clock, enable and data-lines of the shift-register. The 'latch' pin of the register needs to be bit-banged as there seems to be no easy way to pull this off with just SPI (unless.. perhaps, doing something smart with the 'enable' line..)<br />
<br />
<br />
The pure bit-bang approach could use any 3 or 4 GPIO pins on the PI, using the work done on https://projects.drogon.net/raspberry-pi/gpio-examples/ as already used and listed above.<br />
<br />
The SPI approach could use the work done on http://www.100randomtasks.com/simple-spi-on-raspberry-pi.<br />
<br />
An example snippet of code could be<br />
<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
impport spidev<br />
<br />
gpio.setmode(GPIO.BOARD)<br />
gpio.setup(12,GPIO.OUT)<br />
gpio.output(12,False)<br />
<br />
spi = spidev.SpiDev()<br />
spi.open(0,0)<br />
while True:<br />
resp = spi.xfer2([0x5555])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
resp = spi.xfer2([0xAAAA])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
</pre><br />
<br />
This will import the right libs, setup pin 12 as the 'latch' pin, initialize the SPI-bus using CE0 as the chip-enable line (open(0,0)), and then write a 0x5555 value to the SPI-bus; two bytes, aka 16 bits. 0x5555 and 0xAAAA are eachothers complements; an alternating pattern of 0 and 1's, starting either with a 0 (0x5555) or a 1 (0xAAAA). The 'resp' variable will be loaded with whatever comes back in on the input at the same time; if you connect MOSI to MISO , you will normally read the same thing you are writing out. You can also connect the H' pin of register2 to MISO; this will allow you to read the PREVIOUS state of the shift-registers back... for no useful reason, however.<br />
<br />
Toggling pin 12 up and down should trigger the parallel latch to take the contents of the serial latch and adjust the outputs and then make it safe to adjust the serial register again for the next update.</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=11404French FX-7 robot2014-03-24T16:59:04Z<p>Miles: added info about gpio pins</p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
IT MOVES!<br />
<br />
== Overview ==<br />
== System ==<br />
The robot has a total of 5 motors of which 4 are capable of being driven into either direction. These control the tank-tracks , the hip and the arm. The fifth motor spins a gear that winds up a spring and launches one of the three darts that are loaded in the chest-magazine.<br />
<br />
For purposes of clarity, we've numbered the motors accordingly:<br />
<br />
* Motor 1 = Left Track<br />
* Motor 2 = Right Track<br />
* Motor 3 = Hip<br />
* Motor 4 = Arms<br />
* Motor 5 = Dart-gun<br />
<br />
The first four motors are driven using an full H-bridge arrangement using 4 'big' transistors and two small-signal transistors arranged in such a way that the whole H-bridge can be driven with just 2 lines from a microcontroller; assuring that the right 'opposite transistors' get activated when given a 'HIGH' signal.<br />
<br />
The last motor is a bit of an enigma. The arrangement of the transistors is very unclear; but it should be trivial to drive it with a FET or a darlington.<br />
<br />
Next to the motors, the system has a plethora of red LEDs in it's visor, as well as two 'headlights' on either side that switch on when given a command in it's original configuration.<br />
<br />
There is also a speaker that is used for indicating which command's it's been given. Primarily for the purposes of reporting that it's closing or opening it's arms or commencing shooting. It also allows/allowed the operator to speak into the remote-control and have his/her voice be produced from this speaker.<br />
<br />
== New plan with the Carambola2==<br />
<br />
The motor-driver board now has a Carambola2 device directly mounted onto it. The board gets power via an LM7805-based power-supply which regulates the power coming from the LithiumPolymer battery and makes the system fully self-contained.<br />
<br />
The nice thing about the Carambola2 is that it has onboard WIFI and allows easy remote control this way; as well as having all the GPIO niceties that you might wish for.<br />
Sadly, the SPI-bus on the device is not easily usable by default without a bit of kernel-work. It has been decided that it'd be easier to just re-wire things to use the GPIO's individually; it has enough of them available.<br />
<br />
<br />
=== Controlling the device ===<br />
<br />
THe device has been configured to use Bonjour to announce itself as 'milobot.local' and be reachable on account 'root'. Password is known to the right people.<br />
<br />
Driving the GPIO's is rather easy. It requires a few preparatory steps:<br />
For example GPIO15<br />
<br />
* Export the pin using 'echo 15 > /sys/class/gpio/export'<br />
* This will create/enable the directory '/sys/class/gpio/gpio15'<br />
* Configure the pin direction (input/output) 'echo out > /sys/class/gpio/gpio15/direction'<br />
* Configure the pin state to 'off' 'echo 0 > /sys/class/gpi0/gpio15/value'<br />
<br />
* Setting the pin to 'on' state involves writing a '1' to the 'value' in the last step.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
<br />
=== Work done ===<br />
<br />
* All the GPIO's have been connected and tested to drive the H-Bridges correctly<br />
* Status LED's have been soldered next to each output to be able to debug issues with motor, output/etc.<br />
** Green = Forward<br />
** Red = Backward<br />
* A bash-programs have been produced to allow initializing the GPIO's as well as controlling each of the first 4 motor drivers using single keys.<br />
* A rewrite has been made that cleans up some code ; requires testing, however.<br />
* Layout improvements<br />
<br />
=== Work to be done ===<br />
<br />
* It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
** THIS HAS ALREADY BEEN DONE WITH BASH; BUT PYTHON/ANYTHING_USEFUL WOULD BE BETTER*<br />
* Note: we are lacking Python/perl/whatever on this thing. We need to find out how to install stuff on OpenWRT<br />
* Add a fuse between the power-connector and the rest of the circuit.<br />
* Pins 23,22,21,20,19,18,17,16,15,1 can be used as GPIO. Some (like 17 for example) may be on at startup, wich is not very useful. We need to find out how to change this.<br />
<br />
=== Programs ====<br />
==== Original 'initialize.sh' ====<br />
<pre><br />
<br />
#!/bin/sh<br />
<br />
for i in 15 16 18 19 20 21 22 23<br />
do <br />
echo Initializing Pin $i<br />
echo Export pin $i<br />
echo $i > /sys/class/gpio/export<br />
echo Set direction to output for gpio$i<br />
echo out > /sys/class/gpio/gpio$i/direction<br />
echo Clearing state to zero on gpio$i<br />
echo 0 > /sys/class/gpio/gpio$i/value<br />
done<br />
</pre><br />
<br />
==== original 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q, a, z = left<br />
# w,s,x = right<br />
<br />
<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
echo 1 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 1 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
echo 1 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards'; <br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 1 > /sys/class/gpio/gpio19/value;<br />
<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
echo 1 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 1 > /sys/class/gpio/gpio21/value;<br />
<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close'; <br />
echo 1 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 1 > /sys/class/gpio/gpio23/value;<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP'; <br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
exit<br />
else <br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== New-style 'command.sh' ====<br />
This one contains help, initialization in one go. Cleaned up a bit using a function for GPIO toggling and has some help-text.<br />
<br />
To be done: <br />
* suppress local echo of pressed key<br />
* write action on fixed spot<br />
* Provide status-map of motors above the bottom line; update it on change.<br />
<br />
For now, it first needs testing.. it seems like it should work.<br />
<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
<br />
<br />
base="/sys/class/gpio"<br />
ports='15 16 18 19 20 21 22 23'<br />
<br />
function gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo 'GPIO$i not initialized; exporting and configuring as output'<br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0<br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 15 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1<br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0<br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0<br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1<br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
== Abandoned ideas ==<br />
=== Direct Drive control via RaspPI ===<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Original 'direct drive' Layout was as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
=== 'Direct Drive' Python code ===<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
</pre><br />
<br />
<pre><br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
</pre><br />
<br />
<br />
With this code-shim you can test the function of your code even without having RPi.GPIO loaded (like on most PC's)<br />
Note it doesnt implement all things yet; but enough to work for this project currently.<br />
Working on a shift-register help-library<br />
<br />
<br />
<pre><br />
class FAKEGPIO:<br />
def __init__(self):<br />
self.BOARD=1<br />
self.OUT=0<br />
self.IN=1<br />
def setmode(self,variant):<br />
print "Call: setmode: variant -> " + str(variant)<br />
def setup(self,pin, type):<br />
print "Call: setup : pin -> " + str(pin) + ", type -> " + str(type)<br />
def output(self,pin,state):<br />
print "Out:" + str(pin) + "-> " + str(state)<br />
<br />
gpio = FAKEGPIO()<br />
</pre><br />
<br />
== Shift-Register driving of robot ==<br />
<br />
Since the RaspPI doesnt have much IO and the robot requires 8 output-pins just for the basic motor-control already, we've started looking at driving the outputs using shift-registers instead.<br />
<br />
The proto-board has been re-wired to have two shift-registers hosted on it, connected in series, for a total of 16 outputs.<br />
<br />
The shift-registers in question are the 74HCT595's that has an 8-bit serial register controlled by 'data' and 'clock' lines, and an 8-bit parallel 'latch' that is controlled by a separate line; allowing you to control at which moment the 8 output pins (output A-H) should reflect the state of the internal 8-bit serial register.<br />
<br />
By having the parallel register in between the outputs and the serially controlled register, you are able to change the contents of the serial register at your own leisure without the outputs directly following your changes.<br />
<br />
The last control-lines on the 74HCT595 are a 'master reset' pin (active LOW; so connect to HIGH if unused) and a 'Chip enable' (active LOW, connect to GND if not used)<br />
<br />
<br />
The motor-pins are connected to the first of the two shift-registers; this means that the last 8 bits of data shifted into the 16 bit register-space controls the motors as the first bit shifted in ends up being at the last-most position after 16 clock-cycles.<br />
<br />
<br />
{| class="wikitable"<br />
!colspan="6"|Shift-register layout<br />
|-<br />
! align="left"| Register<br />
! align="left"| Bit<br />
! align="left"| Motor<br />
! align="left"| Direction<br />
|-<br />
|rowspan=8| 1<br />
|0<br />
|Left Tread<br />
|Forwards<br />
|-<br />
|1<br />
|Left Tread<br />
|Backwards<br />
|-<br />
|2<br />
|Right Tread<br />
|Forwards<br />
|-<br />
|3<br />
|Right Tread<br />
|Backwards<br />
|-<br />
|4<br />
|Hip<br />
|Forwards<br />
|-<br />
|5<br />
|Hip<br />
|Backwards<br />
|-<br />
|6<br />
|Arms<br />
|Open<br />
|-<br />
|7<br />
|Arms<br />
|Close<br />
|-<br />
|rowspan="8"|2<br />
|0<br />
|TBD<br />
|TBD<br />
|-<br />
|1<br />
|TBD<br />
|TBD<br />
|-<br />
|2<br />
|TBD<br />
|TBD<br />
|-<br />
|3<br />
|TBD<br />
|TBD<br />
|-<br />
|4<br />
|TBD<br />
|TBD<br />
|-<br />
|5<br />
|TBD<br />
|TBD<br />
|-<br />
|6<br />
|TBD<br />
|TBD<br />
|-<br />
|7<br />
|TBD<br />
|TBD<br />
|}<br />
<br />
=== Software Side ===<br />
<br />
To drive the shift-register, two approaches can be used. Either full 'software bit-banging' or using the SPI-bus on the Raspberry PI to drive (at least) the clock, enable and data-lines of the shift-register. The 'latch' pin of the register needs to be bit-banged as there seems to be no easy way to pull this off with just SPI (unless.. perhaps, doing something smart with the 'enable' line..)<br />
<br />
<br />
The pure bit-bang approach could use any 3 or 4 GPIO pins on the PI, using the work done on https://projects.drogon.net/raspberry-pi/gpio-examples/ as already used and listed above.<br />
<br />
The SPI approach could use the work done on http://www.100randomtasks.com/simple-spi-on-raspberry-pi.<br />
<br />
An example snippet of code could be<br />
<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
impport spidev<br />
<br />
gpio.setmode(GPIO.BOARD)<br />
gpio.setup(12,GPIO.OUT)<br />
gpio.output(12,False)<br />
<br />
spi = spidev.SpiDev()<br />
spi.open(0,0)<br />
while True:<br />
resp = spi.xfer2([0x5555])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
resp = spi.xfer2([0xAAAA])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
</pre><br />
<br />
This will import the right libs, setup pin 12 as the 'latch' pin, initialize the SPI-bus using CE0 as the chip-enable line (open(0,0)), and then write a 0x5555 value to the SPI-bus; two bytes, aka 16 bits. 0x5555 and 0xAAAA are eachothers complements; an alternating pattern of 0 and 1's, starting either with a 0 (0x5555) or a 1 (0xAAAA). The 'resp' variable will be loaded with whatever comes back in on the input at the same time; if you connect MOSI to MISO , you will normally read the same thing you are writing out. You can also connect the H' pin of register2 to MISO; this will allow you to read the PREVIOUS state of the shift-registers back... for no useful reason, however.<br />
<br />
Toggling pin 12 up and down should trigger the parallel latch to take the contents of the serial latch and adjust the outputs and then make it safe to adjust the serial register again for the next update.</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=11362French FX-7 robot2014-03-20T12:44:53Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
IT MOVES!<br />
<br />
== Overview ==<br />
== System ==<br />
The robot has a total of 5 motors of which 4 are capable of being driven into either direction. These control the tank-tracks , the hip and the arm. The fifth motor spins a gear that winds up a spring and launches one of the three darts that are loaded in the chest-magazine.<br />
<br />
For purposes of clarity, we've numbered the motors accordingly:<br />
<br />
* Motor 1 = Left Track<br />
* Motor 2 = Right Track<br />
* Motor 3 = Hip<br />
* Motor 4 = Arms<br />
* Motor 5 = Dart-gun<br />
<br />
The first four motors are driven using an full H-bridge arrangement using 4 'big' transistors and two small-signal transistors arranged in such a way that the whole H-bridge can be driven with just 2 lines from a microcontroller; assuring that the right 'opposite transistors' get activated when given a 'HIGH' signal.<br />
<br />
The last motor is a bit of an enigma. The arrangement of the transistors is very unclear; but it should be trivial to drive it with a FET or a darlington.<br />
<br />
Next to the motors, the system has a plethora of red LEDs in it's visor, as well as two 'headlights' on either side that switch on when given a command in it's original configuration.<br />
<br />
There is also a speaker that is used for indicating which command's it's been given. Primarily for the purposes of reporting that it's closing or opening it's arms or commencing shooting. It also allows/allowed the operator to speak into the remote-control and have his/her voice be produced from this speaker.<br />
<br />
== New plan with the Carambola2==<br />
<br />
The motor-driver board now has a Carambola2 device directly mounted onto it. The board gets power via an LM7805-based power-supply which regulates the power coming from the LithiumPolymer battery and makes the system fully self-contained.<br />
<br />
The nice thing about the Carambola2 is that it has onboard WIFI and allows easy remote control this way; as well as having all the GPIO niceties that you might wish for.<br />
Sadly, the SPI-bus on the device is not easily usable by default without a bit of kernel-work. It has been decided that it'd be easier to just re-wire things to use the GPIO's individually; it has enough of them available.<br />
<br />
<br />
=== Controlling the device ===<br />
<br />
THe device has been configured to use Bonjour to announce itself as 'milobot.local' and be reachable on account 'root'. Password is known to the right people.<br />
<br />
Driving the GPIO's is rather easy. It requires a few preparatory steps:<br />
For example GPIO15<br />
<br />
* Export the pin using 'echo 15 > /sys/class/gpio/export'<br />
* This will create/enable the directory '/sys/class/gpio/gpio15'<br />
* Configure the pin direction (input/output) 'echo out > /sys/class/gpio/gpio15/direction'<br />
* Configure the pin state to 'off' 'echo 0 > /sys/class/gpi0/gpio15/value'<br />
<br />
* Setting the pin to 'on' state involves writing a '1' to the 'value' in the last step.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
<s>Next to that; the PSU circuit should be re-worked into a better layout.</s><br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
=== Work done ===<br />
<br />
* All the GPIO's have been connected and tested to drive the H-Bridges correctly<br />
* Status LED's have been soldered next to each output to be able to debug issues with motor, output/etc.<br />
** Green = Forward<br />
** Red = Backward<br />
* A bash-programs have been produced to allow initializing the GPIO's as well as controlling each of the first 4 motor drivers using single keys.<br />
* A rewrite has been made that cleans up some code ; requires testing, however.<br />
* Layout improvements<br />
<br />
=== Work to be done ===<br />
<br />
* It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
** THIS HAS ALREADY BEEN DONE WITH BASH; BUT PYTHON/ANYTHING_USEFUL WOULD BE BETTER*<br />
* Note: we are lacking Python/perl/whatever on this thing. We need to find out how to install stuff on OpenWRT<br />
* Rework the board to remove the shift-registers and move the PSU there *PARTLY DONE*<br />
* Add a fuse between the power-connector and the rest of the circuit.<br />
<br />
=== Programs ====<br />
==== Original 'initialize.sh' ====<br />
<pre><br />
<br />
#!/bin/sh<br />
<br />
for i in 15 16 18 19 20 21 22 23<br />
do <br />
echo Initializing Pin $i<br />
echo Export pin $i<br />
echo $i > /sys/class/gpio/export<br />
echo Set direction to output for gpio$i<br />
echo out > /sys/class/gpio/gpio$i/direction<br />
echo Clearing state to zero on gpio$i<br />
echo 0 > /sys/class/gpio/gpio$i/value<br />
done<br />
</pre><br />
<br />
==== original 'command.sh' ====<br />
<pre><br />
#!/bin/sh<br />
<br />
# q, a, z = left<br />
# w,s,x = right<br />
<br />
<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
echo 1 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 0 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
echo 0 > /sys/class/gpio/gpio15/value;<br />
echo 1 > /sys/class/gpio/gpio16/value;<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
echo 1 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 0 > /sys/class/gpio/gpio19/value;<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards'; <br />
echo 0 > /sys/class/gpio/gpio18/value;<br />
echo 1 > /sys/class/gpio/gpio19/value;<br />
<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
echo 1 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 0 > /sys/class/gpio/gpio21/value;<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards'; <br />
echo 0 > /sys/class/gpio/gpio20/value;<br />
echo 1 > /sys/class/gpio/gpio21/value;<br />
<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close'; <br />
echo 1 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 0 > /sys/class/gpio/gpio23/value;<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open'; <br />
echo 0 > /sys/class/gpio/gpio22/value;<br />
echo 1 > /sys/class/gpio/gpio23/value;<br />
<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP'; <br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in 15 16 18 19 20 21 22 23<br />
do<br />
echo 0 > /sys/class/gpio/gpio$i/value;<br />
done<br />
exit<br />
else <br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
==== New-style 'command.sh' ====<br />
This one contains help, initialization in one go. Cleaned up a bit using a function for GPIO toggling and has some help-text.<br />
<br />
To be done: <br />
* suppress local echo of pressed key<br />
* write action on fixed spot<br />
* Provide status-map of motors above the bottom line; update it on change.<br />
<br />
For now, it first needs testing.. it seems like it should work.<br />
<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
# q,a,z = left track (forwards/stop/backwards)<br />
# w,s,x = right track (forwards/stop/backwards)<br />
# e,d,c = hip hinge (forwards/stop/backwards)<br />
# r,f,v = control arms (close/stop/open)<br />
<br />
<br />
base="/sys/class/gpio"<br />
ports='15 16 18 19 20 21 22 23'<br />
<br />
function gpio(){<br />
# Sets gpio-pin $1 to state $2<br />
echo $2 > "$base/gpio$1/value"<br />
}<br />
<br />
echo 'Checking port initialization';<br />
for i in $ports<br />
do<br />
if [ ! -d "$base$i" ]; then<br />
echo 'GPIO$i not initialized; exporting and configuring as output'<br />
echo $i > "$base/export"<br />
echo out > "$base/gpio$i/direction"<br />
gpio $i 0<br />
fi<br />
done<br />
echo "Initialization done"<br />
echo "Usage: forwards, stop, backwards"<br />
echo "Left track : q, a, z"<br />
echo "Right track: w, s, x"<br />
echo "Hip hinge : e, d, c"<br />
echo "Arms : r, f, v"<br />
echo "Special keys:"<br />
echo "Spacebar = Emergency stop"<br />
echo "p = stop all motors and quit application"<br />
<br />
while true<br />
do<br />
read -n1 KEY<br />
if [ "$KEY" == 'q' ]; then<br />
echo 'Left Forwards';<br />
gpio 15 1<br />
gpio 16 0<br />
elif [ "$KEY" == 'a' ]; then<br />
echo 'Left Stop';<br />
gpio 15 0<br />
gpio 16 0<br />
elif [ "$KEY" == 'z' ]; then<br />
echo 'Left Backwards';<br />
gpio 15 0<br />
gpio 15 1<br />
elif [ "$KEY" == 'w' ]; then<br />
echo 'Right Forwards';<br />
gpio 18 1<br />
gpio 19 0<br />
elif [ "$KEY" == 's' ]; then<br />
echo 'Right Stop';<br />
gpio 18 0<br />
gpio 19 0<br />
elif [ "$KEY" == 'x' ]; then<br />
echo 'Right Backwards';<br />
gpio 18 0<br />
gpio 19 1<br />
elif [ "$KEY" == 'e' ]; then<br />
echo 'Bend Forwards';<br />
gpio 20 1<br />
gpio 21 0<br />
elif [ "$KEY" == 'd' ]; then<br />
echo 'Bend Stop';<br />
gpio 20 0<br />
gpio 21 0<br />
elif [ "$KEY" == 'c' ]; then<br />
echo 'Bend Backwards';<br />
gpio 20 0<br />
gpio 21 1<br />
elif [ "$KEY" == 'r' ]; then<br />
echo 'Arms Close';<br />
gpio 22 1<br />
gpio 23 0<br />
elif [ "$KEY" == 'f' ]; then<br />
echo 'Arms Stop';<br />
gpio 22 0<br />
gpio 23 0<br />
elif [ "$KEY" == 'v' ]; then<br />
echo 'Arms Open';<br />
gpio 22 0<br />
gpio 23 1<br />
elif [ "$KEY" == '' ]; then<br />
echo 'STOP';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
elif [ "$KEY" == 'p' ]; then<br />
echo 'Quitting and resetting all outputs. Bye!';<br />
for i in $ports<br />
do<br />
gpio $i 0<br />
done<br />
exit<br />
else<br />
echo "Other key: $KEY";<br />
fi<br />
done<br />
</pre><br />
<br />
== Abandoned ideas ==<br />
=== Direct Drive control via RaspPI ===<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Original 'direct drive' Layout was as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
=== 'Direct Drive' Python code ===<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
</pre><br />
<br />
<pre><br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
</pre><br />
<br />
<br />
With this code-shim you can test the function of your code even without having RPi.GPIO loaded (like on most PC's)<br />
Note it doesnt implement all things yet; but enough to work for this project currently.<br />
Working on a shift-register help-library<br />
<br />
<br />
<pre><br />
class FAKEGPIO:<br />
def __init__(self):<br />
self.BOARD=1<br />
self.OUT=0<br />
self.IN=1<br />
def setmode(self,variant):<br />
print "Call: setmode: variant -> " + str(variant)<br />
def setup(self,pin, type):<br />
print "Call: setup : pin -> " + str(pin) + ", type -> " + str(type)<br />
def output(self,pin,state):<br />
print "Out:" + str(pin) + "-> " + str(state)<br />
<br />
gpio = FAKEGPIO()<br />
</pre><br />
<br />
== Shift-Register driving of robot ==<br />
<br />
Since the RaspPI doesnt have much IO and the robot requires 8 output-pins just for the basic motor-control already, we've started looking at driving the outputs using shift-registers instead.<br />
<br />
The proto-board has been re-wired to have two shift-registers hosted on it, connected in series, for a total of 16 outputs.<br />
<br />
The shift-registers in question are the 74HCT595's that has an 8-bit serial register controlled by 'data' and 'clock' lines, and an 8-bit parallel 'latch' that is controlled by a separate line; allowing you to control at which moment the 8 output pins (output A-H) should reflect the state of the internal 8-bit serial register.<br />
<br />
By having the parallel register in between the outputs and the serially controlled register, you are able to change the contents of the serial register at your own leisure without the outputs directly following your changes.<br />
<br />
The last control-lines on the 74HCT595 are a 'master reset' pin (active LOW; so connect to HIGH if unused) and a 'Chip enable' (active LOW, connect to GND if not used)<br />
<br />
<br />
The motor-pins are connected to the first of the two shift-registers; this means that the last 8 bits of data shifted into the 16 bit register-space controls the motors as the first bit shifted in ends up being at the last-most position after 16 clock-cycles.<br />
<br />
<br />
{| class="wikitable"<br />
!colspan="6"|Shift-register layout<br />
|-<br />
! align="left"| Register<br />
! align="left"| Bit<br />
! align="left"| Motor<br />
! align="left"| Direction<br />
|-<br />
|rowspan=8| 1<br />
|0<br />
|Left Tread<br />
|Forwards<br />
|-<br />
|1<br />
|Left Tread<br />
|Backwards<br />
|-<br />
|2<br />
|Right Tread<br />
|Forwards<br />
|-<br />
|3<br />
|Right Tread<br />
|Backwards<br />
|-<br />
|4<br />
|Hip<br />
|Forwards<br />
|-<br />
|5<br />
|Hip<br />
|Backwards<br />
|-<br />
|6<br />
|Arms<br />
|Open<br />
|-<br />
|7<br />
|Arms<br />
|Close<br />
|-<br />
|rowspan="8"|2<br />
|0<br />
|TBD<br />
|TBD<br />
|-<br />
|1<br />
|TBD<br />
|TBD<br />
|-<br />
|2<br />
|TBD<br />
|TBD<br />
|-<br />
|3<br />
|TBD<br />
|TBD<br />
|-<br />
|4<br />
|TBD<br />
|TBD<br />
|-<br />
|5<br />
|TBD<br />
|TBD<br />
|-<br />
|6<br />
|TBD<br />
|TBD<br />
|-<br />
|7<br />
|TBD<br />
|TBD<br />
|}<br />
<br />
=== Software Side ===<br />
<br />
To drive the shift-register, two approaches can be used. Either full 'software bit-banging' or using the SPI-bus on the Raspberry PI to drive (at least) the clock, enable and data-lines of the shift-register. The 'latch' pin of the register needs to be bit-banged as there seems to be no easy way to pull this off with just SPI (unless.. perhaps, doing something smart with the 'enable' line..)<br />
<br />
<br />
The pure bit-bang approach could use any 3 or 4 GPIO pins on the PI, using the work done on https://projects.drogon.net/raspberry-pi/gpio-examples/ as already used and listed above.<br />
<br />
The SPI approach could use the work done on http://www.100randomtasks.com/simple-spi-on-raspberry-pi.<br />
<br />
An example snippet of code could be<br />
<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
impport spidev<br />
<br />
gpio.setmode(GPIO.BOARD)<br />
gpio.setup(12,GPIO.OUT)<br />
gpio.output(12,False)<br />
<br />
spi = spidev.SpiDev()<br />
spi.open(0,0)<br />
while True:<br />
resp = spi.xfer2([0x5555])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
resp = spi.xfer2([0xAAAA])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
</pre><br />
<br />
This will import the right libs, setup pin 12 as the 'latch' pin, initialize the SPI-bus using CE0 as the chip-enable line (open(0,0)), and then write a 0x5555 value to the SPI-bus; two bytes, aka 16 bits. 0x5555 and 0xAAAA are eachothers complements; an alternating pattern of 0 and 1's, starting either with a 0 (0x5555) or a 1 (0xAAAA). The 'resp' variable will be loaded with whatever comes back in on the input at the same time; if you connect MOSI to MISO , you will normally read the same thing you are writing out. You can also connect the H' pin of register2 to MISO; this will allow you to read the PREVIOUS state of the shift-registers back... for no useful reason, however.<br />
<br />
Toggling pin 12 up and down should trigger the parallel latch to take the contents of the serial latch and adjust the outputs and then make it safe to adjust the serial register again for the next update.</div>Mileshttps://wiki.techinc.nl/index.php?title=Open_day_Hackerspaces_2014&diff=11350Open day Hackerspaces 20142014-03-18T11:39:11Z<p>Miles: added French FX-7 robot to demonstrations</p>
<hr />
<div>{{Event<br />
|Date=2014/03/29<br />
|Location=(h)ACTA<br />
|EventType=Other<br />
|Contact=voidz0r<br />
}}<br />
On the 29th of March 2014 Techinc opens her doors again for anyone interested. <br />
Visitors can see what hacking is, what we are working on and do something themselves...<br />
<br />
<div style="clear:right;float: right">{{Rainbow|Yay open daY!!1}}</div><br />
==What do?==<br />
===Activities===<br />
* Soldering(?)<br />
* Laser cutting(?)<br />
* other...?<br />
===Talks===<br />
We will host talks in the auxiliary room, ''we need a projector for this!''<br />
''UPDATE: [[User:Justa|Justa]] is willing to loan out his SVGA projector''<br />
*you?<br />
<br />
===Demonstrations===<br />
*What makes a model helicopter fly? -- [[User:Phicoh|Phicoh]]<br />
*A colorful light installation built using a Raspberry PI, Python, a USB-DMX controller and left over parts from OHM2013 -- [[User:Phicoh|Phicoh]]<br />
*The [[French FX-7 robot]], with a Carabola 2 in it.<br />
*you?<br />
<br />
===BBQ===<br />
<nowiki>&lt; amx109&gt; if the waether holds a bbq sounds like fun</nowiki><br/><br />
''any volunteers?''<br />
<br />
==Other spaces==<br />
* https://ackspace.nl/wiki/Open_Door_Day_29-3-2014<br />
* https://hack42.nl/wiki/Open_dag_Hackerspaces_29_maart_2014<br />
* https://revspace.nl/OpenDag2014<br />
* http://tkkrlab.nl/wiki/OpenDag_Hackerspaces_2014</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=11349French FX-7 robot2014-03-18T11:36:59Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
IT MOVES!<br />
<br />
== Overview ==<br />
== System ==<br />
The robot has a total of 5 motors of which 4 are capable of being driven into either direction. These control the tank-tracks , the hip and the arm. The fifth motor spins a gear that winds up a spring and launches one of the three darts that are loaded in the chest-magazine.<br />
<br />
For purposes of clarity, we've numbered the motors accordingly:<br />
<br />
* Motor 1 = Left Track<br />
* Motor 2 = Right Track<br />
* Motor 3 = Hip<br />
* Motor 4 = Arms<br />
* Motor 5 = Dart-gun<br />
<br />
The first four motors are driven using an full H-bridge arrangement using 4 'big' transistors and two small-signal transistors arranged in such a way that the whole H-bridge can be driven with just 2 lines from a microcontroller; assuring that the right 'opposite transistors' get activated when given a 'HIGH' signal.<br />
<br />
The last motor is a bit of an enigma. The arrangement of the transistors is very unclear; but it should be trivial to drive it with a FET or a darlington.<br />
<br />
Next to the motors, the system has a plethora of red LEDs in it's visor, as well as two 'headlights' on either side that switch on when given a command in it's original configuration.<br />
<br />
There is also a speaker that is used for indicating which command's it's been given. Primarily for the purposes of reporting that it's closing or opening it's arms or commencing shooting. It also allows/allowed the operator to speak into the remote-control and have his/her voice be produced from this speaker.<br />
<br />
== New plan with the Carambola2==<br />
<br />
The motor-driver board now has a Carambola2 device directly mounted onto it. The board gets power via an LM7805-based power-supply which regulates the power coming from the LithiumPolymer battery and makes the system fully self-contained.<br />
<br />
The nice thing about the Carambola2 is that it has onboard WIFI and allows easy remote control this way; as well as having all the GPIO niceties that you might wish for.<br />
Sadly, the SPI-bus on the device is not easily usable by default without a bit of kernel-work. It has been decided that it'd be easier to just re-wire things to use the GPIO's individually; it has enough of them available.<br />
<br />
<br />
=== Controlling the device ===<br />
<br />
THe device has been configured to use Bonjour to announce itself as 'milobot.local' and be reachable on account 'root'. Password is known to the right people.<br />
<br />
Driving the GPIO's is rather easy. It requires a few preparatory steps:<br />
For example GPIO15<br />
<br />
* Export the pin using 'echo 15 > /sys/class/gpio/export'<br />
* This will create/enable the directory '/sys/class/gpio/gpio15'<br />
* Configure the pin direction (input/output) 'echo out > /sys/class/gpio/gpio15/direction'<br />
* Configure the pin state to 'off' 'echo 0 > /sys/class/gpi0/gpio15/value'<br />
<br />
* Setting the pin to 'on' state involves writing a '1' to the 'value' in the last step.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
Next to that; the PSU circuit should be re-worked into a better layout. It's too tightly cramped along the edge of the board to allow a proper heatsink to be safely mounted on it without risking a short-circuit. The shift-registers are not required anymore and the foot-prints for that might be easily removed.<br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
=== Work done ===<br />
<br />
* All the GPIO's have been connected and tested to drive the H-Bridges correctly<br />
* Status LED's have been soldered next to each output to be able to debug issues with motor, output/etc.<br />
** Green = Forward<br />
** Red = Backward<br />
* A bash-programs have been produced to allow initializing the GPIO's as well as controlling each of the first 4 motor drivers using single keys.<br />
* A rewrite has been made that cleans up some code ; requires testing, however.<br />
<br />
=== Work to be done ===<br />
<br />
It'd be good to have a python program working (in preparation to a python class) that will allow control over each motor-driver individually (forward, backward, stop) as well as perhaps some 'macros' (drive forward, drive backward, rotate left, rotate right, turn left, turn right, reverse turn left, reverse turn right.... perhaps more, as well as the arms, hinge, etc.<br />
<br />
Next to that; the PSU circuit should be re-worked into a better layout. It's too tightly cramped along the edge of the board to allow a proper heatsink to be safely mounted on it without risking a short-circuit. The shift-registers are not required anymore and the foot-prints for that might be easily removed.<br />
<br />
Next to that we really should work on putting a fuse-holder on the board to protect against short-circuits. We've already had one accident result in a completely vaporized bit of wire..<br />
<br />
== Abandoned ideas ==<br />
=== Direct Drive control via RaspPI ===<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Original 'direct drive' Layout was as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
=== 'Direct Drive' Python code ===<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
</pre><br />
<br />
<pre><br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
</pre><br />
<br />
<br />
With this code-shim you can test the function of your code even without having RPi.GPIO loaded (like on most PC's)<br />
Note it doesnt implement all things yet; but enough to work for this project currently.<br />
Working on a shift-register help-library<br />
<br />
<br />
<pre><br />
class FAKEGPIO:<br />
def __init__(self):<br />
self.BOARD=1<br />
self.OUT=0<br />
self.IN=1<br />
def setmode(self,variant):<br />
print "Call: setmode: variant -> " + str(variant)<br />
def setup(self,pin, type):<br />
print "Call: setup : pin -> " + str(pin) + ", type -> " + str(type)<br />
def output(self,pin,state):<br />
print "Out:" + str(pin) + "-> " + str(state)<br />
<br />
gpio = FAKEGPIO()<br />
</pre><br />
<br />
== Shift-Register driving of robot ==<br />
<br />
Since the RaspPI doesnt have much IO and the robot requires 8 output-pins just for the basic motor-control already, we've started looking at driving the outputs using shift-registers instead.<br />
<br />
The proto-board has been re-wired to have two shift-registers hosted on it, connected in series, for a total of 16 outputs.<br />
<br />
The shift-registers in question are the 74HCT595's that has an 8-bit serial register controlled by 'data' and 'clock' lines, and an 8-bit parallel 'latch' that is controlled by a separate line; allowing you to control at which moment the 8 output pins (output A-H) should reflect the state of the internal 8-bit serial register.<br />
<br />
By having the parallel register in between the outputs and the serially controlled register, you are able to change the contents of the serial register at your own leisure without the outputs directly following your changes.<br />
<br />
The last control-lines on the 74HCT595 are a 'master reset' pin (active LOW; so connect to HIGH if unused) and a 'Chip enable' (active LOW, connect to GND if not used)<br />
<br />
<br />
The motor-pins are connected to the first of the two shift-registers; this means that the last 8 bits of data shifted into the 16 bit register-space controls the motors as the first bit shifted in ends up being at the last-most position after 16 clock-cycles.<br />
<br />
<br />
{| class="wikitable"<br />
!colspan="6"|Shift-register layout<br />
|-<br />
! align="left"| Register<br />
! align="left"| Bit<br />
! align="left"| Motor<br />
! align="left"| Direction<br />
|-<br />
|rowspan=8| 1<br />
|0<br />
|Left Tread<br />
|Forwards<br />
|-<br />
|1<br />
|Left Tread<br />
|Backwards<br />
|-<br />
|2<br />
|Right Tread<br />
|Forwards<br />
|-<br />
|3<br />
|Right Tread<br />
|Backwards<br />
|-<br />
|4<br />
|Hip<br />
|Forwards<br />
|-<br />
|5<br />
|Hip<br />
|Backwards<br />
|-<br />
|6<br />
|Arms<br />
|Open<br />
|-<br />
|7<br />
|Arms<br />
|Close<br />
|-<br />
|rowspan="8"|2<br />
|0<br />
|TBD<br />
|TBD<br />
|-<br />
|1<br />
|TBD<br />
|TBD<br />
|-<br />
|2<br />
|TBD<br />
|TBD<br />
|-<br />
|3<br />
|TBD<br />
|TBD<br />
|-<br />
|4<br />
|TBD<br />
|TBD<br />
|-<br />
|5<br />
|TBD<br />
|TBD<br />
|-<br />
|6<br />
|TBD<br />
|TBD<br />
|-<br />
|7<br />
|TBD<br />
|TBD<br />
|}<br />
<br />
=== Software Side ===<br />
<br />
To drive the shift-register, two approaches can be used. Either full 'software bit-banging' or using the SPI-bus on the Raspberry PI to drive (at least) the clock, enable and data-lines of the shift-register. The 'latch' pin of the register needs to be bit-banged as there seems to be no easy way to pull this off with just SPI (unless.. perhaps, doing something smart with the 'enable' line..)<br />
<br />
<br />
The pure bit-bang approach could use any 3 or 4 GPIO pins on the PI, using the work done on https://projects.drogon.net/raspberry-pi/gpio-examples/ as already used and listed above.<br />
<br />
The SPI approach could use the work done on http://www.100randomtasks.com/simple-spi-on-raspberry-pi.<br />
<br />
An example snippet of code could be<br />
<br />
<pre><br />
import RPi.GPIO as gpio<br />
import time<br />
impport spidev<br />
<br />
gpio.setmode(GPIO.BOARD)<br />
gpio.setup(12,GPIO.OUT)<br />
gpio.output(12,False)<br />
<br />
spi = spidev.SpiDev()<br />
spi.open(0,0)<br />
while True:<br />
resp = spi.xfer2([0x5555])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
resp = spi.xfer2([0xAAAA])<br />
print resp([0])<br />
gpio.output(12,True)<br />
gpio.output(12,False)<br />
time.sleep(1)<br />
</pre><br />
<br />
This will import the right libs, setup pin 12 as the 'latch' pin, initialize the SPI-bus using CE0 as the chip-enable line (open(0,0)), and then write a 0x5555 value to the SPI-bus; two bytes, aka 16 bits. 0x5555 and 0xAAAA are eachothers complements; an alternating pattern of 0 and 1's, starting either with a 0 (0x5555) or a 1 (0xAAAA). The 'resp' variable will be loaded with whatever comes back in on the input at the same time; if you connect MOSI to MISO , you will normally read the same thing you are writing out. You can also connect the H' pin of register2 to MISO; this will allow you to read the PREVIOUS state of the shift-registers back... for no useful reason, however.<br />
<br />
Toggling pin 12 up and down should trigger the parallel latch to take the contents of the serial latch and adjust the outputs and then make it safe to adjust the serial register again for the next update.</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=11240User:Mi1es2014-03-08T02:20:09Z<p>Miles: moved User:Miles to User:Mi1es: change of nickname from 'Miles' to 'Mi1es'</p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Mi1es<br />
|Memberstatus=member<br />
|Tasks=Being a 16-year-old<br />
|Project=French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.<br />
<br />
<br />
URL:<br />
http://milo.gonggri.jp<br />
http://milogonggrijp.nl<br />
<br />
E-mail:<br />
milo [at] gonggri.jp</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Miles&diff=11241User:Miles2014-03-08T02:20:09Z<p>Miles: moved User:Miles to User:Mi1es: change of nickname from 'Miles' to 'Mi1es'</p>
<hr />
<div>#REDIRECT [[User:Mi1es]]</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=11239User:Mi1es2014-03-08T02:16:56Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Mi1es<br />
|Memberstatus=member<br />
|Tasks=Being a 16-year-old<br />
|Project=French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.<br />
<br />
<br />
URL:<br />
http://milo.gonggri.jp<br />
http://milogonggrijp.nl<br />
<br />
E-mail:<br />
milo [at] gonggri.jp</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=11238User:Mi1es2014-03-08T02:16:10Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Mi1es<br />
|Memberstatus=member<br />
|Tasks=Being a 16-year-old<br />
|Project=French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.<br />
<br />
<br />
URL:<br />
milo.gonggri.jp<br />
milogonggrijp.nl<br />
<br />
E-mail:<br />
milo [at] gonggri.jp</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=11237User:Mi1es2014-03-08T02:14:35Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Mi1es<br />
|Memberstatus=member<br />
|Tasks=Being a 16-year-old<br />
|URL=http://milo.gonggri.jp http://milogonggrijp.nl<br />
|Project=French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.</div>Mileshttps://wiki.techinc.nl/index.php?title=Project_ball_pit&diff=10967Project ball pit2014-02-15T18:07:46Z<p>Miles: Created page with "{{Project |ProjectStatus=Planning |ProjectNiche=Other |ProjectPurpose=Fun }} Target: ball pit in the small new room
room is 2,80*1,65 + 0,40*1,75 = 5,3 m^2.
Filling the ro..."</p>
<hr />
<div>{{Project<br />
|ProjectStatus=Planning<br />
|ProjectNiche=Other<br />
|ProjectPurpose=Fun<br />
}}<br />
Target: ball pit in the small new room<br />
<br />
room is 2,80*1,65 + 0,40*1,75 = 5,3 m^2.<br />
Filling the room with 1,50 meters of balls makes it 8 m^3.<br />
<br />
But(t)...<br />
WE NEED CHEAPER BALLS!</div>Mileshttps://wiki.techinc.nl/index.php?title=File:Drowning_in_ball_pit.jpg&diff=10966File:Drowning in ball pit.jpg2014-02-15T18:06:44Z<p>Miles: </p>
<hr />
<div></div>Mileshttps://wiki.techinc.nl/index.php?title=Miles&diff=10766Miles2014-02-05T20:35:48Z<p>Miles: Blanked the page</p>
<hr />
<div></div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=10377French FX-7 robot2014-01-22T23:05:37Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
== Overview ==<br />
== System ==<br />
== Work done ==<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Layout is as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
<br />
== Python code ==<br />
<br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
""" while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
"""<br />
<br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
<br />
<br />
<br />
<br />
<br />
== Future ==</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=10369French FX-7 robot2014-01-22T20:36:41Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"<br />
<br />
== Overview ==<br />
== System ==<br />
== Work done ==<br />
Machine has been taken apart.. blblblalbla<br />
<br />
<br />
H-bridge board has all the transistors of the original board on it for 4 full H-bridges that can drive all of the four bi-directional motors.<br />
<br />
Layout is as follows , with the connectors of the motors facing you:<br />
<br />
*First block, gpio18, w1, gpio4, w7, Left tread<br />
*Second block, gpio17,w0, gpio23,w4, Right treads<br />
*Third block: gpio27,w2, gpio22,w3, hip<br />
*Fourth block: gpio24, w5, gpio25,w6, arms<br />
<br />
<br />
Python code<br />
<br />
import RPi.GPIO as gpio<br />
import time<br />
import pygame<br />
from pygame.locals import *<br />
<br />
<br />
gpio.setmode(gpio.BOARD)<br />
gpio.setup(7, gpio.OUT)<br />
gpio.setup(11, gpio.OUT)<br />
gpio.setup(13, gpio.OUT)<br />
gpio.setup(15, gpio.OUT)<br />
<br />
gpio.output(7, True)<br />
gpio.output(11, True)<br />
<br />
""" while True:<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
time.sleep(2)<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
time.sleep(2)<br />
"""<br />
<br />
pygame.init()<br />
screen = pygame.display.set_mode((640,480))<br />
pygame.display.set_caption("Pygame")<br />
pygame.mouse.set_visible(0)<br />
<br />
done = False<br />
enable = 0<br />
direction = 0<br />
while not done:<br />
for event in pygame.event.get():<br />
if(event.type==KEYDOWN):<br />
print event<br />
if(event.key==273):<br />
direction=1;<br />
enable=1;<br />
if(event.key==274):<br />
direction=-1;<br />
enable=1; <br />
if(event.type==KEYUP):<br />
print event<br />
if(event.key==273):<br />
direction=0;<br />
enable=0;<br />
if(event.key==274):<br />
direction=0;<br />
enable=0;<br />
<br />
if(enable==1):<br />
if(direction==1):<br />
print "Forwards"<br />
gpio.output(13, False)<br />
gpio.output(15, True)<br />
if(direction==-1):<br />
print "Backwards"<br />
gpio.output(13, True)<br />
gpio.output(15, False)<br />
else:<br />
gpio.output(13, False)<br />
gpio.output(15, False)<br />
<br />
<br />
<br />
<br />
<br />
== Future ==</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=9611French FX-7 robot2013-12-22T21:49:33Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Electronics, Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=9610French FX-7 robot2013-12-22T21:48:53Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Soldering, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=8333French FX-7 robot2013-10-30T19:08:59Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Coding, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=7939User:Mi1es2013-10-14T14:40:57Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Miles<br />
|Memberstatus=member<br />
|Project=French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.</div>Mileshttps://wiki.techinc.nl/index.php?title=6V_battery_for_the_FX-7_robot&diff=79386V battery for the FX-7 robot2013-10-14T14:39:16Z<p>Miles: Blanked the page</p>
<hr />
<div></div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=7937French FX-7 robot2013-10-14T14:37:35Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Coding, Programming, Creative thinking,<br />
|ProjectStatus=Active<br />
|ProjectNiche=Software<br />
|ProjectPurpose=World domination<br />
}}<br />
"Contrôle système! Contrôle système!"</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=7720User:Mi1es2013-09-28T23:05:36Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|picture=Screenshot 2013-07-09-20-27-56.png<br />
|Nickname=Miles<br />
|Memberstatus=member<br />
|Project=6V battery for the FX-7 robot, French FX-7 robot<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}<br />
I like bands.</div>Mileshttps://wiki.techinc.nl/index.php?title=File:Screenshot_2013-07-09-20-27-56.png&diff=7719File:Screenshot 2013-07-09-20-27-56.png2013-09-28T23:04:57Z<p>Miles: Miles</p>
<hr />
<div>Miles</div>Mileshttps://wiki.techinc.nl/index.php?title=User:Mi1es&diff=7718User:Mi1es2013-09-28T22:59:38Z<p>Miles: Created page with "{{Members |Nickname=Miles |Memberstatus=member |Projects=French FX-7 robot, 6V battery for the FX-7 robot }}"</p>
<hr />
<div>{{Members<br />
|Nickname=Miles<br />
|Memberstatus=member<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}</div>Mileshttps://wiki.techinc.nl/index.php?title=Miles&diff=7717Miles2013-09-28T22:57:49Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|Nickname=[[Miles]]<br />
|Memberstatus=member<br />
|Projects=[[French FX-7 robot]], [[6V battery for the FX-7 robot]]<br />
}}</div>Mileshttps://wiki.techinc.nl/index.php?title=Miles&diff=7716Miles2013-09-28T22:56:20Z<p>Miles: </p>
<hr />
<div>{{Members<br />
|Nickname=[[Miles]]<br />
|Memberstatus=member<br />
|Projects=[[French FX-7 robot]], [[6V battery FX-7 robot]]<br />
}}</div>Mileshttps://wiki.techinc.nl/index.php?title=6V_battery_for_the_FX-7_robot&diff=77156V battery for the FX-7 robot2013-09-28T22:39:26Z<p>Miles: Created page with "{{Project |ProjectSkills=Soldering, Basic electronics, |ProjectStatus=Getting parts |ProjectNiche=Electronics |ProjectPurpose=Use in other project }}"</p>
<hr />
<div>{{Project<br />
|ProjectSkills=Soldering, Basic electronics, <br />
|ProjectStatus=Getting parts<br />
|ProjectNiche=Electronics<br />
|ProjectPurpose=Use in other project<br />
}}</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=7714French FX-7 robot2013-09-28T22:31:39Z<p>Miles: </p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectSkills=Coding, Programming, Creative thinking, <br />
|ProjectStatus=Getting parts<br />
|ProjectNiche=Software<br />
|ProjectPurpose=World domination<br />
}}<br />
The robot speaks French now, it's going to speak whatever you want it to, and it'll get the mate from the fridge to your table.<br />
<br />
I want to give it power, put a Raspberry Pi in it and add a few functions.</div>Mileshttps://wiki.techinc.nl/index.php?title=French_FX-7_robot&diff=7713French FX-7 robot2013-09-28T22:28:58Z<p>Miles: Created page with "{{Project |picture=FX-7.jpg |ProjectStatus=Getting parts |ProjectNiche=Software |ProjectPurpose=World domination }} The robot speaks French now, it's going to speak whatever y..."</p>
<hr />
<div>{{Project<br />
|picture=FX-7.jpg<br />
|ProjectStatus=Getting parts<br />
|ProjectNiche=Software<br />
|ProjectPurpose=World domination<br />
}}<br />
The robot speaks French now, it's going to speak whatever you want it to, and it'll get the mate from the fridge to your table.<br />
<br />
I want to give it power, put a Raspberry Pi in it and add a few functions.</div>Mileshttps://wiki.techinc.nl/index.php?title=File:FX-7.jpg&diff=7712File:FX-7.jpg2013-09-28T22:12:25Z<p>Miles: FX-7 robot from 1998, he speaks French.</p>
<hr />
<div>FX-7 robot from 1998, he speaks French.</div>Mileshttps://wiki.techinc.nl/index.php?title=Miles&diff=7299Miles2013-09-06T19:39:13Z<p>Miles: Created page with "{{Members |Nickname=Miles |Memberstatus=member }}"</p>
<hr />
<div>{{Members<br />
|Nickname=Miles<br />
|Memberstatus=member<br />
}}</div>Miles