Articles tagged with Raspberry Pi:

  • Eyepot - Programming

    Let's program the robot I built in the previous article!

    The Eyepot works by using in conjunction a Raspberry Pi Zero W and an Arduino Pro Mini connected by a serial link. Therefore, we'll write the Arduino code first, then a Python program for the Raspberry Pi. Then, we'll setup remote control from a web browser.

    You can find the entire source code for the project licensed under GPLv3 on my repository on GitHub.

    The finished Eyepot moving

    The finished Eyepot moving

    Arduino program

    The Arduino Pro Mini is responsible for driving the eight servos of the legs. Commands to specify target angles are sent from the Raspberry Pi through a serial link.

    The custom serial protocol is text-based and quite simple. It can easily be typed manually when debugging, but it is still compact enough to allow short transmission times even at low bitrates. Each line contains a one-character command, an optional space, and an optional parameter as a base-10 integer. Implemeted commands are as follows:

    • 0 to 7: store target angle for corresponding servo (0 to 7)
    • R: reset stored target angle to default for each servo
    • C: commit stored target angles (apply the stored angle for each servo)

    So, for instance …


  • Eyepot: a creepy teapot

    What has four legs but only one eye? A teapot of course!

    My new robot is based on a Raspberry Pi Zero W with a camera. It is connected via a serial link to an Arduino Pro Mini board, which drives servos. Since each one of the four legs will have two articulations, each with one servo, we need eight servos in total.

    Here is a list of the material we will use:

    Let's start by designing and printing the parts. I use OpenSCAD, and print with white PLA, as usual.

    View of the 3D models set

    View of the 3D models set

    You can download the SCAD source files (licensed under GPLv3) and the corresponding STL files here or on my GitHub repository …


  • A small 3D-printed NAS

    Network-Attached Storages (NAS) are very handy devices on a home network. They offer a simple way to share or synchronize files, and can host various useful services at the same time provided they are generic enough. A NAS being nothing more than a specialized file server, we will actually build a small home server than will be able to do anything.

    The functions can be the following:

    • File server (FTP, NFS, SMB/CIFS...)
    • Streaming server (audio or video on the local network)
    • Personal web server (to host a website, synchonize contacts or send files to people)
    • Local seedbox (to download torrent files)
    • Domotic hub (for instance by adding a Zigbee USB dongle)

    The server will be pretty simple in its technical design: a Raspberry Pi 2 model B with two hard disks connected with USB adapters.

    The finished NAS featuring a Raspberry Pi 2

    The finished NAS featuring a Raspberry Pi 2

    The Raspberry Pi is actually not able to power the two drives over USB, since we would need 500mA per drive, so 1000mA overall, and the Pi can only supply 600mA over USB. There is a possible boot setting in /boot/config.txt called max_usb_current, which when set to 1 raises the maximum current intensity over …


Categories
Tags
Feeds