diyrobotics-blog
diyrobotics-blog
DIY Robotics
16 posts
Don't wanna be here? Send us removal request.
diyrobotics-blog · 10 years ago
Text
Accessing a network folder on RPi2
Another thing that should have been trivial, but was not.
I had recently configured a simple shared folder for backing up pictures from our phones using the Android app ‘SyncMe’. Very convenient, simple to setup.
It would be great to backup my code endeavors up until now likewise on the shared folder. When I tried to set that up, there was some confusion on what the mounting (connection of the network drive or folder to a local folder) instructions were, and there are several methods depending on your needs. So here is how I end up doing it, in case you need it:
Manual approach
 By hand, for \\10.0.0.1\code, I ended up using:
> mkdir /mnt/code > sudo mount -t cifs -o guest,sec=ntlmv2 //192.168.0.1/code /mnt/code
The tricks here are:
the type of mount has changed for his type of folders, it used to be smbfs before 2008 or so, and now it is cifs
for this shared folders on a USB hard drive attached to our home router, it required adding the ‘sec=nmtlv2′ option to prevent the error: 
mount error(13): Permission denied
Semi automatic approach
The instruction given in this thread were helpful , and need to be tweaked with the above:
after doing the manual approach above and creating the folder, it is time to edit /etc/fstab
> sudo nano /etc/fstab
In there add the line:
//192.168.0.1/code /mnt/code cifs guest,sec=ntlmv2,uid=1000,gid=1000 0 0
This is it. After this anytime you need this mount you can get it via:
> sudo mount -a
Let’s even add convenient access from within /home/pi by linking the mounted folder to /home/pi/code via a symbolic link, assuming we are in /home/pi:
> ln -s /mnt/code-on-network code
To undo it if needed (from /home/pi):
> unlink code
Disclaimer:
This was an example for backup or file transfer purposes, not a genuine setup of a code repository. I have not settled yet on the latter topic, but will be looking in setting up something like git on my local network.
In this day and age, developers know the value of incremental change, and history of changes. Shared folders are just not enough for anything beyond 16h of coding effort.
Well, let’s enjoy our shared folders on the Raspberry pi!
0 notes
diyrobotics-blog · 10 years ago
Text
Routers: massively vulnerable ... or not?
A recent conversation (thanks Paul) reminded me of a not too distant past reflection.
I was in feasibility study mode one evening, trying to figure out if my router - which has 2.4 and 5GHz bands - could act as a wifi slave on one band, and a wifi hotspot on the other band. That did not end so well for that project due to vendor drivers or possibly the chip itself. However in the process I encountered this: http://securityaffairs.co/wordpress/20941/hacking/netgear-linkys-routers-backdoor.html.
In it was a gruesome tale of:  real bugs/negligence (some admin pages unprotected by password), and a more bizarre story of a backdoor.
The former was quite concerning.
Now to the latter. I know this sounds bad, but after trying and succeeding to break into my own router, I paused and realized the following:
the vulnerability is on the LAN, meaning that it is required to plug into the router somehow. This does not sound like cyber crime, more of a regular break-in. At this point, surely fiddling with the router is not going to be top priority.
if a computer with LAN access was compromised, then it could hack into the router. Well ... yes but at this point the computer in question already has all the access it could wish for, what would be the point ? 
the scripts used to either brute force, or after reverse engineering easily sneak in, are written in python in less than 30 lines.
Ah! Python! I am getting to know python better and better, and was impressed recently by the conciseness of it. I even used it for work the other day at my own surprise (again: < 30 lines for a webserver). Revisiting the topic above gives another perspective on the non isolated nature of this observation.
I ll talk about it soon in another topic regarding which language to start in , a candid review.
Now back to 1.
Most intelligent electronic product have a way to be turned into slaves to any one having physical access to them. Think about it: most phones I have had could be rooted, erased, reprogrammed with custom ROMs. I have not heard this being interpreted as a backdoor. Is this not the same scenario for routers, which are by in large out of physical reach for anyone but their legitimate owners?.
Note: the backdoor seems to have, in fact, been documented, for instance here: http://wiki.openwrt.org/toh/netgear/telnet.console. I can’t say this was there before the news flash, but that would be a little comical if it were :)
I may be missing something here, and if so please enlighten me in the comment section (which has just been enabled today).
I will just finish here by mentioning this observation, still by Paul, that you have to make a tradeoff between security and convenience. You can rarely have both.
In the mean time, go check out your routers, and be a first time hacker on your own LAN :)
0 notes
diyrobotics-blog · 10 years ago
Text
Python magic on Raspberry Pi from anywhere
In the context of making robots, and adding python to the mix, I realized that we were about to make something magic.
Like with a magic wand, you want to wave here , and have a miracle happen there, at a distance.
I had implemented at work with colleague’s help a first stab of Service Oriented Architecture (SOA). And here I stumbled upon it, all ready for use.
The secret sauce is called rpyc ! It allows to run single instructions or complete scripts on a remote ‘server’. Let’s say we had a RPi in a robot, we could pilot it trhough the whole house via python, with fast closed loop on the robot, and maybe more involved trajectory planning done on a PC/Android somewhere accessible via wifi. How cool is that?
One use that caught my eye also, was the possibility to build a (mostly) single script based multi platform (anything running python that can take native modules?) infrastructure for orchestrating tests for distributed systems, which I worked on for some years. But here I am contemplating doing more than I dreamt of, and for home projects.
Anyway, let’s get a bunch of random platforms connected!
For that, we need rpyc both on the client and the server.
Note: make sure that they all use the same version of Python, in what follows it is python2.7.
Installation on the server (RPi)
Steps I found here, my comments for applying it on rpi image 2015-05-05-raspbian-wheezy on July 3, 2015:
First, the package installer we will need to add modules to python
> sudo apt-get install python-pip (...) > pip --versionpip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
Note: python v2.6 gets installed as well, but ignored later. Maybe an alternative way worth a try. 
Next the actual modules, rpyc and its dependency plumbum:
>sudo pip install rpyc (...) Downloading rpyc-3.3.0.tar.gz (53Kb): 53Kb downloaded (...) Downloading plumbum-1.4.2.tar.gz (52Kb): 52Kb downloaded (...)
Installation on client 1 (PC)
Start with installing a python distribution, I chose Anaconda 2.7
then open a fresh command line window and use pip, which should now be available on the path (meaning: the installer made the anaconda utilities reachable regardless of your current directory):
c:\User\XXX> pip install rpyc (...) Downloading rpyc-3.3.0.tar.gz (53kB) (...) Downloading plumbum-1.4.2.tar.gz (52kB)
The first interaction
At this point, I only had to :
- start another terminal on RPI in which the server will run using:
> rpyc_classic.py 
Yes, as simple as that on that side.
Then on the PC I was then able to start Spyder, the editor that comes in Anaconda, and try out the following in the immediate window:
import rpyc c = rpyc.classic.connect("192.168.1.10") import sys c.modules.sys.stdout = sys.stdout c.execute("print 'hi here'")     # this should come back to the client 
And it did show on the client, as expected. Great!
Installation on client 2 (Android phone)
When I realized that Raspbian could do it, so maybe Android could, I got very excited. Enough to carry me through laboriously finding a fix on the way. So here is my proud contribution to future users: 
First install Qpython (I chose the default one with python 2.7)
Then run one of the pre-loaded scripts with the GUI: -click the logo/button - select ‘run local script’ , then chose ‘pip_console.py’
in the console:
>pip install rpyc
On this LG3 phone, I ran into some issues, as it seems that the installation via ‘pip’ was imperfect. After sticking with it for a while, the following was uncovered:
- that the path in case of the app’s ‘console’ window was able to ‘import rpyc’ without failure
- but a script running from ‘run local script’ or ‘program’ icon selection, would not be able to ‘import rpyc’ , and rather left that window with a console in a different context at the above
- I compared the $PATH in both the ‘console’ and ‘run local script approach’, and saw major differences in the working case:
- I recognized an explicit path to rpyc and its dependency plumbum, beware its ugly:
/data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg /data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages/plumbum-1.4.2-py2.7.egg
- when I browsed in both places, there was a subfolder with simpler name (as in ‘rpyc’ for one, and ‘plymbum’ for each respectively), with their module signature file: ‘__init__.pyo’
- when I browsed around in the parent directory, I found out that the pygame library/module had, under ‘/.../site-packages’ , both a file finishing in .egg (not directory as for rpyc) and a concise ‘pygame’ folder with its first file: ‘__init__.pyo’
So after first confirming that adding the path helped, it was time to try and fixed the install by bringing the hidden folders one level up. [EDIT> Note that what follows must be run in the shell window that runs in qpython in order to have sufficient privilegies. To do that you can create a bad script and run it, you will end up in the shell !!  Tested again on September 22, 2015] :
>cd data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages/ >cp -R rpyc-3.3.0-py2.7.egg/rpyc . >cp -R plumbum-1.4.2-py2.7.egg/plumbum .
And TADAAA ... filnally the following program, typed on qpython’s editor, worked!
import rpyc c = rpyc.classic.connect("192.168.1.10") import sys c.modules.sys.stdout = sys.stdout c.execute("print 'hi here'")
Manouvering qpython and consoles with a good keyboard
Now to type on a phone scripts or program , you need a good exhaustive keyboard. I chose to go with : Hacker’s keyboard
that s it for now. What a glorious tool.
0 notes
diyrobotics-blog · 10 years ago
Text
Setting up Flash on Chromium
Before being able to run the web version of Scratch on Rpi2, it seemed necessary to install one of the flash engines on top of the Chromium Web Browser.
Here is how to get chromium:
sudo apt-get install chromium
After that it is available in the menu under the sub-menu Internet.
Here are the steps I followed for the flash plugin:
wget http://odroidxu.leeharris.me.uk/PepperFlash-12.0.0.77-armv7h.tar.gz
tar -xzf PepperFlash-12.0.0.77-armv7h.tar.gz
cd PepperFlash/ chmod +x * sudo cp * /usr/lib/chromium/plugins sudo nano /etc/chromium/default 
in there edit the flags line to be:
CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so --ppapi-flash-version=12.0.0.77 -password-store=detect -user-data-dir"
0 notes
diyrobotics-blog · 10 years ago
Text
Learning coding by doing, with Scratch v2
Or how much more good material is out there?
After various attempts at python, it was time to try something else though I will probably be back for more later.
This time this is the old Scratch, for quick gaming/prototyping.
See an attempt here: Modified Sokoban
What amazed me was the ease with which my daughter was able to chime in towards the end. She will get a chance at doing it from scratch (literally and literally) soon enough.
After trying to create entire real scale maps from Excel, I went back to sprite based plotting based on a 2D map stored as a string. Regarding checking of possible movements, solutions gravitated first around sensory solutions ( sprite color X detected to encounter color Y below) then ended up more on the map derived approach.
I wish the variables were less buggy when used in conjunction with messages, but this is no deal breaker. Also, variables do stack up eventually, will need to optimize.
Not sure how to handle tables yet, and I have not yet found return values for functions.
See my next blog entry on how to setup Rpi to run Chromium+Flash so that https://scratch.mit.edu works on it.
Well, this gives me quite an appetite for finding the minimal solution on this platform, and what a joy to have a working game in a few hours!
The graphics approach also seemed in line with some screenshots I saw on the NASA ‘s SPHERES program I saw not so long ago, both are somehow linked to MIT.
See for yourself:
scratch: https://scratch.mit.edu/help/videos/#
SPHERES: http://static.zerorobotics.mit.edu/docs/ms/MoreSimpleArraysandthesetAttitudeTargetFunction.pdf
Something to dig for a while.
Not that you can create your own account on the Zerorobotics website with a google account, and start simulating. 
0 notes
diyrobotics-blog · 10 years ago
Text
How cool is that ? Your code in space
I wished for it, turns out that it exists!
see two posts earlier, I wanted a way to run fun code in the space station. Well, it is possible. In fact it has been possible since 2010 it seems!
http://robotics.nasa.gov/events/zerorobotics.php
http://robotics.nasa.gov/zerorobotics/documents/2012_05_09_zero_robotics_rap.pdf
0 notes
diyrobotics-blog · 10 years ago
Text
Choosing quadcopter(s) and parts
1. Entry level quad
Was spending some time researching the topic, found a couple nice ready made DIY-ish quacopters, on sale it seems ($150), with command set:
Turnigy SK450
A nice intro, kid sized radio too. It still needs some work (see here), which I would like as it gives the kids something to help me with, hands on play time!
Hubsan x4
small and great. kid friendly, may not be easier to use than the one above.
Specialized flying machine
While this is being ordered, we need the project’s requirements into parts requirements, before reaching a point where it is possible to order.
So here are the generic requirements:
long duration flight
remote controllable programmatically (my own pet project depends on that)
add sensor and video underneath
fast or vertical landing
I am now considering a plane would be better. AXN or Bixler2 seem a good first gig. Or maybe a foam fighter! Yes, DIY power!
Inspiration
Some nice ones:
flips for  under 120$ - not counting the radio
Meeting the local veterans
Just got in touch with a veteran who let us know about a Saturday day long outing for RC enthusiast around a nearby library.
That’s great, time to check some of the ideas. Can’t wait!
0 notes
diyrobotics-blog · 10 years ago
Text
A robot for the International Space Station ...
If I had a wand , I would ask that a robot be present on the space station. I would want it to be able to move around safely, and to be uploaded with my software and your software from time to time to control it in a fun way , as much for for us on earth as for the crew up there. 
we cannot go there, but we could have our SW go there!
It would have to be safe, stop at night when people sleep, and non metallic so as not to create electrical hazards by connecting things that should not be.
It could change color as if in a mood, and be sad when depleted.
Is that the description of a space age Tamagoshi? not quite.
What would you do with it?
 Of course you could also send your plane in space instead.
0 notes
diyrobotics-blog · 10 years ago
Text
MPU6050 + python3 on RPi2: playing with the system. Age ~10
We built an interactive game around the MPU6050 's features in a fun way for young kids. Check the references at the end for initial setup of the RPi2.
Preparations
To set it up, you will need to organize the 2 files mentioned below as per the folder structure suggested, and add the following empty file: ./lib/__init__.py , which is instrumental in the ‘import’ in Python. you may want to set this up in /home/pi/discovery. Please let me know with questions.
Files found in 2 following posts:
http://diyrobotics.tumblr.com/post/113318665181/file-mpu-game-part1-py http://diyrobotics.tumblr.com/post/113318048456/file-lib-mpu6050-py
Once organized, you should be able to get via the terminal something comparable to this directories’ content (directory “.” and directory "lib”) :
> ls lib         mpu_game_part1.py > ls lib __init__.py        mpu6050.py
Checking progress, finding issues
at any time thereafter you can try to run the main program  mpu_game_part1.py by:
> sudo python3 mpu_gamge_part1.py
Note that Python won’t like some of the broken code I have in there: any type of text looking like  “< ... >” is not meant to work. You will have to wait until that is filled to hope for no errors.
Filling the gaps with info on the page
The student opens mpu_game_part1.py and edits it, then can save and run it as mentioned above. To edit, you can use for instance:
> sudo nano mpu_game_part1.py
move around with the keys or the mouse’s roulette.
edit
to save when in the nano editor: CTRL + O  , then Enter
to save and exit : CTRL + X , then Y, then Enter
The idea so far was to put most of the information on the edited code , so that the student does not need to change location. We read the top part together, trying to make sense of the order of the functions, trying to introduce what functions are.
Based on that, the changes are numbered from 1. to  6.
At step 5. , it is now possible to see something coming out of the sensor. This is really exciting. I noticed that even little kids can pick up which number coming out is the biggest, though negative values are a bit confusing. Still it is a good idea to let them play with the board to see the changes.
Note that at step 5. I also setup the MPU6050 so that it is not on the breadboard anymore, but rather connected on a 1 feet flexible cable, so that even a young one ca grab the sensor and turn it around to see changes. It is good fun for them.
step 6. makes it simpler to visualize, and fun to play with.
Results
Example of what to expect at step 5 if mapped measurement of accelerometer only (raw x, raw y, raw z):
gravity: 17160 12612 -2096 gravity: 13120 11656 -3028 gravity: 15012 13416 -2684 gravity: 12156 9108 -2064 gravity: 16936 6964 -316 gravity: 10424 2340 5928 gravity: 12812 2852 9344 gravity: 14776 3216 12016 gravity: 7756 -6528 12580 gravity: 920 -13044 11468 gravity: -5312 -12944 12948 gravity: -8232 -12352 13908 gravity: -2756 -12188 12008
Example of what to expect at step 6 (P for positive, N for negative):
gravity: _ _ P gravity: _ _ P gravity: _ _ P gravity: P _ _ gravity: P P _ gravity: P _ _ gravity: P _ _ gravity: _ _ P gravity: P _ P gravity: _ N P gravity: _ _ P gravity: _ N P gravity: N _ P gravity: P _ P gravity: P _ _ gravity: P _ P
Note that the sensor is measuring acceleration, which is gravity only when not accelerating (= not shaking).
I hope this is clear, feel free to ask.
What’s next
There is another part planned and ready to go for this week or next weekend, time allowing.
References:
fixing i2c + smbus for RPi2
http://diyrobotics.tumblr.com/post/113141816706/raspberry-pi-2-for-the-kids
connectinf to MPU6050 via i2c on RPi2
http://diyrobotics.tumblr.com/post/113315981381/rpi2-mpu6050-i2c-3d-accelerometer-gyroscope
0 notes
diyrobotics-blog · 10 years ago
Text
file ./mpu_game_part1.py
#!/usr/bin/python3 #http://diyrobotics.tumblr.com/ import time # import sensor library, to help us get measurement from the physical world! # mpu6050 gives the following functions: # mpu6050.FindOnI2C ( address ) <= returns True if MPU found at that address, False otherwise # mpu6050.PowerOn ( address ) <= assuming the address was found on I2C, turn it ON # mpu6050.Measure ( addr, measurement ) <= returns the value of a measurement (signed long) # mpu6050 gives the following constants: # mpu6050.ADDRESS0 : the address of MPU on the I2C bus when an identity pin is set low # mpu6050.ADDRESS1 : the address of MPU on the I2C bus when an identity pin is set high # mpu6050.gravity_x : reference to one measurement to be requested in Measure(...) # mpu6050.gravity_y : same as above # mpu6050.gravity_z : same as above # mpu6050.rotation_x : same as above # mpu6050.rotation_y : same as above # mpu6050.rotation_z : same as above import lib.mpu6050 as mpu6050 #prepare what we are going to do def Main(): def oneChar(val): if (val>10000): return "P" elif (val<-10000): return "N" return "_" # MPU initializations # 1. find mpu sensor on I2C bus # 2. save the address in a friendly name (for instance addr) to use it later # 3. if everything ok, power on # replace <condition> with condition checking that MPU was found # replace <power ON> with the proper function #start of Work if ( <condition>): <power ON> # HERE DO SOMETHING COOL FOREVER # until user interrupts with 2 buttons pressed at the same time on the keyboard: [CTRL] + [C] while True: #get data from the sensors # 4. read values from sensors into variables # opportune moment to talk about 3D, and axis x , y, z # replace <more measurements> so as to get values for y and z gravity_x = mpu6050.Measure( addr, mpu6050.gravity_x) <more measurements> # 5. basic display using function oneChar # replace <variables> by our values read, separated by commas # now the system is read!!! # open another terminal and start the code with "sudo python3 mpu_game_part1.py" # 6. simpler display using function oneChar # process variables in oneChar before display #display them print ( "gravity:", <variables> ) #wait 1second before starting fun stuff once more time.sleep(.1) #then do it! Main()
0 notes
diyrobotics-blog · 10 years ago
Text
file './lib/mpu6050.py'
#!/usr/bin/python3 # http://diyrobotics.tumblr.com/ #MPU6050 simplified driver import smbus # gravity force and gyrometer registers definitions ADDRESS0 = 0x68 ADDRESS1 = 0x69 REGISTER_AX_MSB = 0x3B REGISTER_AY_MSB = 0x3D REGISTER_AZ_MSB = 0x3F REGISTER_WHO_AM_I = 0x75 REGISTER_PWR1 = 0x6b REGISTER_GYRX_MSB = 0x43 REGISTER_GYRY_MSB = 0x45 REGISTER_GYRZ_MSB = 0x47 #map measurement reference to first register to use gravity_x = REGISTER_AX_MSB gravity_y = REGISTER_AY_MSB gravity_z = REGISTER_AZ_MSB rotation_x = REGISTER_GYRX_MSB rotation_y = REGISTER_GYRY_MSB rotation_z = REGISTER_GYRZ_MSB #SmBus inits smbusNumber = 1 bus = smbus.SMBus(smbusNumber) print ("smbus:",smbusNumber) def FindOnI2C ( address ): print ( "\nStart MPU6050 identity test for address ", address ) ret = bus.read_byte_data(address, REGISTER_WHO_AM_I); if ret == address: print("I2C Read Test Passed, MPU6050 Address:", ret) return True else: print("ERROR: MPU6050 Test Failed for address:",address) return False def PowerOn(addr): bus.write_byte_data(addr, REGISTER_PWR1, 0) #accelerometer helper function def read_word_2c ( addr, reg ): high = bus.read_byte_data(addr, reg) low = bus.read_byte_data(addr, reg+1) val = (high << 8) + low return val def convert_2s_complement( val ): if (val >= 0x8000): return -((65535 - val) + 1) else: return val def Measure ( addr, measurement ): reg= measurement val = read_word_2c( addr, reg ) return convert_2s_complement(val)
0 notes
diyrobotics-blog · 10 years ago
Text
RPi2 + MPU6050 (i2c 3d accelerometer+gyroscope)
I had been planning to use this MPU with the Nano I bought, however after having a blast playing with the kids on RPi2, I wanted to connect this I2C component to the I2C capable RPi2. How hard could it be?
Not hard as it turns out. The hardest part is getting used to Terminal.
Software install
Somewhere through the process, I found this guide, partly copied here in case something happened. There are pictures of the wiring too.
http://blog.bitify.co.uk/2013/11/interfacing-raspberry-pi-and-mpu-6050.html 
In the case of a RPi2, assuming you fixed python3 as in my previous post ‘Raspberry Pi 2 for the kids’ , I believe that the following should be avoided:
> sudo apt-get install python-smbus > sudo apt-get install i2c-tools
The following config file needs editing on with the ‘nano’ editor.
> sudo nano /etc/modules
You will need to add the following lines at the end:
snd-bcm2835 i2c-dev
On RPi2 I did not have issues with blacklisting.
I later found out that I had to reconfigure the board to enable I2C bus 1
Done via 
> sudo raspi-config 
then go to 
Advanced Options ->  I2C enabled <yes> -> I2c module loaded by default <yes>
Then reboot
> sudo reboot
Hardware install and identification
I soldered the pins that came with the MPU6050 in order to be able to insert it on the bread board.
After wiring, I saw a red light on the MPU6050 board, a good sign!
It was time to try and identify if anyone was detected on the I2C bus via:
> sudo i2cdetect -y 1
The result was positive for '68' , which is in hexadecimal for the address of MPU.
0x68 = 104
You can hard wire MPU6050 to respond on 0x69, if you wanted something else on 0x68.
Using MPU6050
At that point you can find the manuals for its I2C interface on the web, and/or find a partial driver in Python3 like I wanted to do
From the same author as above: 
http://blog.bitify.co.uk/2013/11/reading-data-from-mpu-6050-on-raspberry.html
I used it as base for making a teaching course for my 7year old, which we went through last Saturday. I will share it here after.
0 notes
diyrobotics-blog · 10 years ago
Photo
Tumblr media
$70 kit for Raspberry Pi 2 kit.
I usually search on camelcamelcamel.com to verify if it is a good deal still at the time I purchase it. Resellers like Amazon see quite some changes of prices over time.
0 notes
diyrobotics-blog · 10 years ago
Text
Raspberry Pi 2 for the kids
While looking around for light hardware to put aboard a quadcopter, I kept finding expensive boards for a flight controller, that is, beyond $50. Then in contrast, I kept being teased by a $35 Linux box. I thought 'oh yes, $30 would be great, if only it was what I am looking for'.
I battled feature creep for the better of a week and went with an Arduino Nano for less than $20. Later fired it up, and ran a couple of basic tests. Wow, easy handling, compact, efficient. I also bought an MPU6050 tri axial accelerometer and gyroscope to connect to it for the quadcopter. I will write about the MPU later, it was a good investment, not in the way I intended but still.
Now that it was settled, it was time to consider the  magic Linux box. With a new computer in the house, I could finally go beyond everyone's expectations while relocating the glorious epic fun and joy to the kid's game room. Yes! much scream and joy, only interrupted by the occasional wheezing sound of a catapulted barbie, would resonate at a reasonable 30 feet away from my desk through 3 layers of flooring and walls.
And so came through the door the tantalizing Linux box: the Raspberry Pi 2B. Much discussed and newly launched  by a couple brits on a good cop bad cop routine , it was finally here, accompanied by all the accessories that would make it a kid magnet. LEDs, resistors, HDMI cable, etc...
Immediately there were a few drawbacks, but never fear:
the python3 support for the smbus was lacking[fixed]
Before I had the time to say 'bugger', though a novice, I had recompiled the GPIO wrapper for Python3 following someone's guide, koodos to the online community. Searching for it again gave me the following, which I believe is equivalent to what I did:
> cd ~ > sudo apt-get -y install python3-dev > wget http://ftp.de.debian.org/debian/pool/main/i/i2c-tools/i2c-tools_3.1.0.orig.tar.bz2 > tar xf i2c-tools_3.1.0.orig.tar.bz2 > cd i2c-tools-3.1.0/py-smbus > mv smbusmodule.c smbusmodule.c.orig > wget -O smbusmodule.c http://piborg.org/downloads/picoborgrev/smbusmodule.c.txt > wget http://lm-sensors.org/svn/lm-sensors/tags/V2-10-8/kernel/include/i2c-dev.h > python3 setup.py build > sudo python3 setup.py install
Note: I do not know if others still have issues.
Still there is more that should get resolved sooner than later:
Flash is not supported, blocking access to the kids preferred game 'fire boy and water girl'
need an LCD with DVI input for less $30 ASAP
While trying to resolve this, it became apparent that it was possible to turn this box into a fantastic Arcade system with Retropie, which was done quickly over the following weekend. Blimey, it made my childhood games accessbile, as if on my old MSX computer, fiercely equipped of a Z80 and 32KB of RAM, running at a glorious 3.5MHz. And here came King's Valley, The Goonies, and other Pacman. It may explain why the box has mysteriously not been transferred from my study to the kids' room.
The best part however was getting the kids to interact with the board and various components. How fun to observe a 7 year old write her first lines of Python to make lights start and stop. Lights that she setup with only a bit of help onto the breadboard, not long after she installed the heat sinks. The couple unforeseen resets induced by Vcc (+5V) encountering Ground (0V) in a mortal resistors' embrace induced some learning, encounter better made at 5V than 110V AC. And more, which will deserve its own post.
So: Yes there are many alternatives, the more classy beaglebone black, or the cuter cubox. And Yes the guys working on it have a peculiar sense of web aesthetics, BUT the projects that people have done with them, and the expansion towards TV top box or Arcade, makes up for any kitsch sights during web searches. Plus what would I do today with more power than on this quad core? Naught.
So I give it to you: despite the probability of picking up a British vocabulary due to intense browsing, and the occasional invasion of one's sanctuary by the legitimate owners of the box (the kids), the RPi2 was worth it.
0 notes
diyrobotics-blog · 10 years ago
Text
Quadcopter: getting started
A quadcopter is a bit out of reach at this point. We have a lot to learn, a lot to experiment, to make the best of this project. No hurry yet, JARVIS is not ready to fly stuff around.
Possible baby steps:
understand the flight sensors used , how this robot feels the world
understand the language to talk to the sensors 
understand propulsion (this part will expand, I am sure) 
understand the power electronics
understand the engines
understand the low level control
undertand the high level control
build a frame
test the components
setup the visual feedback (FPV)
And all of this with my 7 year old or anyone interested around here. To be continued
0 notes
diyrobotics-blog · 10 years ago
Text
There will be robots
This blog is dedicated to discovery, at home or in a group (neighborhood or remote).
In a past life, I was working on industrial robots. Now starting to browse the hobbyist DIY scene, I am thoroughly excited. So much hardware and capabilitie, and so many people to build stuff with ...
So how about "let's start to tinker ASAP", then maybe think about where we end up from time to time?
So here are some ideas on my end of the dare, guys and gals:
a quadcopter.
Jarvis (Just A Rather Very Intelligent System).
What cool stuff would I want on a reusable robot for the International Space station?
My kids have more ideas, I dare them to make a blog ;) , though I may publish here if you want.
See you, and our projects, in the following posts ;)
0 notes