TuxCon 2016 – Free Open Source Software and Hardware event in Plovdiv is 9-10 of July

1914533_424237451118708_4243704469913793339_n

TuxCon 2016 will be on 9th and 10th of July 2016 in Plovdiv 🙂

This year will be the third issue of this conference dedicated to Open Source Hardware and Software.

Many people are confused and think that Olimex is the organizer of TuxCon, which probably caused the mistake in the Hackaday article.

The real credits should be for the people who stand behind TuxCon organization and they are these 10 enthusiasts: Leon Anavi, Vladimir Dzhuvinov, Rangel Ivanov, Atanas Palavrov, Dimitar Gamishev, Stefan Saraev, Stoyan Germanov, Radoslav Kolev, Nikolay Apostolov, Tsvetomir Denchev.

We at Olimex are just helping as we love to support such even in our city.

As always the event will be free to participate, Friday 8th of July evening there will be traditional beer welcome party for the guests and lecturers.

On 10th of July in Olimex training building there will be traditional soldering Hackathon and FPGA basics course for beginners.

If you want to make talk at TuxCon send proposal to the organizers at info@tuxcon.mobi

 

TuxCon 2014 Hardware and Software Hackathons 29 of June

 

Image

 

On 29.06 in Saturday from 10.00 started the Hardware Hackathon in Olimex’s training building, many people were coming and going until 16.30 oclock, about 60 FOSDEM-85 Arduino clone boards were build from kits by people who come mostly from FOSS world and have never touch soldering iron.

The results were amazing, you can see here TuxCon glasses made with FOSDEM-85 kit:

Image

some pictures from the Hackathon are here

 

The Software Hckathon was about programming of Interractive table:

Image

The setup was: 8×8 matrix of 64 pcs RGB LEDs connected with four US-020 Ultra sonic distance sensors connected to OLIMEXINO-328 (Arduino DueMilaNove clone) then connected via USB to A10-OLinuXino-LIME with WIFI running Debian.

LIME was registered in the local WIFI and everyone could log in through SSH and to write his own code.

The project goal was to make something interesting and interactive.

Unfortunately we found bug in our Arduino code which prevented the Hackathon to complete correctly, so we decided to do as follows:

Radoslav Kolev presented his patch work to AVR dude which allow any Linux computer with GPIOs to write code to AVR processors via GPIO fs.

What we are going to do this week is to connect some of the LIME GPIOs to Arduino ICSP so Arduino could be pre-programmed by LIME.

Also we are going to setup web camera which to point to the interactive table and to open access to the LIME in the table from internet. Then we will give 1 week time to everyone who wants to develop something on this table and test his code to may do so.

We will put detailed instructions how to login, how to program the AVR and how to program the RGB/sensors, so the Hackathon will no longer be limited to local area. Anyone from anywhere in the world could participate.

To prevent problems made by the parallel login and programming we encourage the developers to enter in #olimex IRC channel and coordinate the programming and table use.

The prize for the most interesting program will be A20-OLinuXino-MICRO.

We hope the table to be ready for hacking by the end of this week!

TuxCon the FOSS Conference for Mobile and Embedded devices is less than 2 weeks away

Image

TuxCon  is a community-driven event about free and open-source software for mobile and embedded devices. The event is organized by Plovdiv’s hackerspace Hackafe and the entry is free.

Saturday, 28th of June is the day for lectures: the schedule is available at TuxCon web http://tuxcon.mobi/#schedule

During the event there are two lectures where OLinuXino Open Source Hardware Linux computers will be discussed:

Image

The first lecture is “Physical computing with Linux” in which it will be explained at a non-embedded developers level how to access all hardware resources from the Linux user space for OLinuXino like GPIOs, I2C, SPI, UARTs, the Power management – how to make your code aware of whether it runs on Battery or on Mains power supply, what is the temperature of the processor, is the battery charging or not, etc. It will also be explained how to connect sensors, how to connect steppers and servos, how to control them from Linux, how to setup a web server on OLinuXino, how to make all of the hardware resources, offered by this board, available via web interface as well as how to attach camera and do OpenCV processing, and more.

Image

The Second lecture is “Linux driver” where it will be explained how a Linux Driver is created and there will be a step-by-step explanation of how a driver for new hardware like MOD-IO board connected to OLinuXino via UEXT is created. MOD-IO boards have relays and ADCs which will be made available for use in Linux user space via the written driver.

Of course there will be other interesting lectures about Android, FirefoxOS, Tizen etc.

Do not forget that on Sunday 29th of June at the Olimex training building we will run Hardware and Software Hackathons.

Image

There will be a soldering workshop for the well-known FOSDEM Arduino clone board, where you will be trained how to solder alone your first Arduino and then program it and use it.

There will also be two Software tasks for the Hackathon:

 

Image

To make fancy web interface for controlling an interactive RGB LED table: the RGB table have 8×8 RGB Leds which are addressable individually and four proximity sensors at the four sides which detect if someone sits on this side.

 

Image

The second task is to do same for the Coctail-Mixing-Machine – it has 6 fluid pumps connected to the relays which could be opened/closed for a certain amount of time; controlling the volume of the drink in the recipe, flow sensors will give feed back if the fluid is flowing through the pipes; RGB addressable LEDs will be put under every bottle and pump which will make a LED animation while preparing the drink or will signal when the bottle is empty.

Both Hardware tasks will be performed with OLinuXino and all hardware resources will be available through User space APIs, so if you want to participate start thinking in advance and surprise us with your solution 🙂

Everyone who participates in the Hardware Hackathon will keep the Arduino board they built for themselves as a prize.

For everyone participating in the Software Hackathon there will be FOSDEM board prizes and the best solutions will win two A20-OLinuXino-MICRO.

 

Free online e-book “The performance of Open Source Applications”

Image

Interesting book about how to increase the performance of your code, each chapter is written by developer who worked on real project, who had to made an existing system faster.

They cover different goals, but what they have in common is a detailed understanding of what actually happens when, and how the different parts of large applications fit together.

The Art and Philosophy of software development, written in the spirit of Zen kōans

Image

I recently came across this incredible site: http://thecodelesscode.com/contents and was charmed from the very first tale  “The Small Stuff”

My recommendation: read these stories by one per day to extend the pleasure 🙂

iMX233-OLinuXino get started – making the ARCH Linux SD card

Image

In several articles we will make step-by-step guide how first to build ARCH Linux distribution with the necessary tools for development and how then you can write simple HELLO WORLD code and later how to interface our UEXT modules by iMX233-OLinuXino.

I.  First to Get started we need Linux SD card with ARCH Linux.

Why ARCH? Because thanks to Kiril Zyapkov this is the most complete Linux distribution for iMX233-OLinuXino for the moment. It have support for the TV console, I2C, UART, USB, web cameras and different WIFI adapters.

Note that from September 1st we ship ARCH Linux on the iMX233-OLinuXino-SD cards, so if you have one of these you can skip the instructions below, if you do not have you can easily build one, for this purpose you will need computer with running LINUX, we got several messages asking how to build the Linux SD card under Windows and the simple answer is – there is no way you can do this under Windows, if you have Windows the best solution is to download Ubuntu and to install it as second OS, Ubuntu will keep your Windows and you can boot your computer either with Linux either with Windows OS so you do not lose anything (just learn something new 😉 ).

So we assume you have computer running LINUX for the steps below. To write the SD card of course your computer should have also card reader/writer.

1. First you need to download some Linux images from our Gdrive. Put these files in some folder like /home/user/Archlinux for instance.

The files you need are:

Linux-alarm-2.6.35-6-ARCH.img ( https://docs.google.com/open?id=0B-bAEPML8fwlZS0wcFNyLTFpX2M )– this is the kernel image patched with the latest version 2.6.35-6;

– ArchLinuxARM-olinuxino-latest-rootfs-clean.tar.gz ( https://docs.google.com/open?id=0B-bAEPML8fwlLXlxblQxWTVvZVU )– the root file system, only the basics, no extra packages; our recommendation is to get this only if you are familiar with ARCH and you want to add packages by your choice, if you are beginner do not use these but download next file:

– ArchLinuxARM-olinuxino-latest-rootfs.tar.bz2( https://docs.google.com/open?id=0B-bAEPML8fwlNDFUYkx0ZkNWV3c )– the root file system with installed packages and their corresponding dependencies:  mplayer – very powerful media tool to play audio and video; alsi-utils – a tool that can successfully manage the headphone output and line-in input; basedevel – a big and mighty package for every developer; fbset – simple frame buffer ;

2. Insert the card-reader into the Linux host machine.

IMPORTANT NOTE – this example is given with “sdb1” and “sdb2” devices but it could enumerate differently on your host (sdc, sdd, sde etc.), so confirm what it enumerates as before running fdisk!

TIP – Before inserting the card-reader type in the console without pressing Enter:

$ ls /dev/sd

and press the TAB key twice. This should display all of the available devices. Insert the card-reader and press TAB again. Now you should see a new device – the SD-card.

3. Unmount the card-reader:

$ sudo umount /dev/sdb1

NOTE – Some systems doesn’t auto-mount devices so this step may be unnecessary.

4. Format the SD-card using fdisk:

$ sudo fdisk /dev/sdb

5. With the help of the menu create two partitions. The steps are the following:

NOTE – We recommend fist to type “m” to see what does each one of the following operations.

5.1. Type “p” to view existing partitions on the SD-card
5.1. Type “o” to delete all partitions
5.2. Type “n” to create new one
5.3. Set “1” as partition number
5.4. Type “p” to select primary partition
5.5. Press Enter to select default beginning sector
5.6. Type “+32M” to create 32MB partition
5.7. Type “t” to change partition type
5.8. Type “53
5.9. Type “n” to create another partition
5.10. Set “2” as partition number
5.11. Type “p” to set partition as primary
5.12. Press Enter to set default size of the partition
5.13. Type “w” to write partitions to the SD-card

6. Format the second partition with ext3 file system:

$ sudo mkfs.ext3 /dev/sdb2

7. Mount the second partition:

$ sudo mount /dev/sdb2 /mnt/mmc

NOTE – If you don’t have mount-point you should create one. Just type:

$ sudo mkdir /mnt/<dir>

8. Log-in as root for the next operations:

$ sudo su

IMPORTANT NOTE: It is necessary to log-in as root, not as super-user!

9. Extract the downloaded tarball into the second partitions:

# cd /mnt/mmc
# tar -jxvf /home/User/Archlinux/ArchLinuxARM-olinuxino-latest-rootfs.tar.bz2

IMPORTANT NOTE: If you want the clean file system change the second command:

# tar -zxvf /home/User/Archlinux/ArchLinuxARM-olinuxino-latest-rootfs-clean.tar.gz

10. The next step is to to write the boot-loader and kernel image to the first partition.

# dd if=/Archlinux/Linux-alarm-2.6.35-6-ARCH.img of=/dev/sdb1

11. Unmount the SD-card, it should be ready for use.

# cd
# sync
# umount /dev/sdb2

IMPORTANT NOTE: The default log-in is : root, and the password is also: root.

II. Setup Internet

NOTE – This is working example, but you may read some additional information, if this doesn’t work for you.

With every reboot the device is assigned with different MAC address. To change this use these commands:

# ip link set dev usb0 down
# ip link set dev usb0 address aa:bb:cc:dd:ee:ff
# ip link set dev usb0 up

To set an IP address enter:
# ifconfig usb0 192.168.0.249

or whatever address you want.

After that add default gateway:
# route add default gw 192.168.0.1 usb0

Finally you should add DNS-server. You should modify /etc/resolv.conf with vi, or other program. For example:
# vi /etc/resolv.conf

Press d several times to remove all lines. Press I to enter insert mode. Type:
# nameserver 192.168.0.1

(Again this is example. You should add you DNS-server.)
After you finish entering this press Esc. This will set the program in command mode. In command mode press:
:wq

This should do the work. To check connection use ping. If it doesn’t, check your configuration again and router settings. You can use ifconfig to see OLinuXino settings.

III. Hello World!

Now we have all tools to make our first program for iMX233-OLinuXino:

using vi editor you can type this code:

#include <stdio.h>

int main (int argc, char *argv[]) {
if (argc > 1)
printf(“\r\n Hello %s.\r\n\r\n”, argv[1]);
else
printf(“\r\n Hello World.\r\n\r\n”);

return 0 ;
}

if you are lazy to do this in the /home/examples directory this example is already written 🙂

to compile the code use:

# gcc hello_world.c -o hello

then make hello executable with

# chmod +x hello

and you can test the code with

# ./hello <your name>

the code should display

Hello <your name>.

IV. Blinking LED

Now when we made our first C code for iMX233-OLinuXino is time to make our first shell script.

with vi editor again you can write this code :

echo out > /sys/class/gpio/gpio65/direction
while [ 1 -eq 1 ]
do
echo 1 > /sys/class/gpio/gpio65/value
sleep 1
echo 0 > /sys/class/gpio/gpio65/value
sleep 1
done

this is simple endless loop to blink the green LED next to the power connector, if we want it to be executed at every board boot we can add it to the rc.local

# vi /etc/rc.local

Add the path to the script file:

/home/examples/led_blink/led_blink &

The “&” means that the script will be running in background.

Now every time when the board boot will execute this script and the green LED will start blinking which proves the board works correctly.

I hope this is good start for beginners, tomorrow I will post how you can talk to I2C devices connected to UEXT connector like MOD-MAG 3 axis magnetometer for instance.

A13-OLinuXino software progress

Image

Last weekend Dimitar Gamishev successfully ran Uboot on A13-OLinuXino and later Slackware 14 and Ubuntu 12.04.

http://pastie.org/4582471

http://imageshack.us/photo/my-images/221/screenshotat20120824232.png/

The Linux Kernel 3.x which is provided by Allwinner have support for GPIO, SPI, I2C, UARTs so generally the support for A13-OLinuXino (which uses not well documented processor) is more complete than on the documented iMX233 where the Kernel support 3.x is still work in progress 🙂

So A13 Linux support is way ahead iMX233 for the moment.

The WiFi, USB stack, 3G modem, LCD, USB-to-Ethernet and all goodies available under Android are also supported in Linux.

Our major problem remain the video, A13-OLinuXino works fine with LCD but we still can’t set the video controller to generate decent VGA output. We spent over a week trying to identify and fix the problems without much success.

The problem is that we have no access to the video initialization nor info for the A13 video registers, the initialization is made with Allwinner custom bootloader which they do not release as sources, but which can be “adjusted” by one text file where you write all video parameters.

The problem is that this bootloader probably have bug inside as no matter how we setup the VGA signals the video in the setup file, the generator generate video picture in 16:9 format (which is OK for the LCD panel), so even if we set it to 800×600 pixels the video generator sends 1400×600 pixels which overlap with the synchro timing and make the picture to have some kind of shadows when displayed on 4:3 VGA monitor, these shadows dissapear on more modern 16:9 VGA monitors as probably they have some build intelligence to reconstruct even broken video input. So this definitely needs some more hacking.

We start shipping the Developer edition of A13-OLinuXino Rev.B today and hopefully when more eyes can look at the code we can have better success on this issue.