Category: Development

Shell Basics Workshop Report n. 3/3 Juli 2010

comments Comments Off on Shell Basics Workshop Report n. 3/3 Juli 2010
By , July 27, 2010 03:24

>> nerdcafe Vetomat 26.7.2010        snufu/fuzzy speach, Zbog report
SHELL BASICS N°3

$ ncal -w

calendar for the current week (it shows the all month)

$ red

open a (strange) text editor in the terminal to go out: q + enter

$ mcedit filename

the famous midnight-command editor (apt-get install mc)

$ mc

clone of an oldschool filemanager

—————————-

$ tput

initialize a terminal

$ reset

query terminfo database
(clear the complete terminal window)

————————–

$ cp "source" "destination"

copy files in directory (is an automatic paste)
=======================================================================================

$ mkdir "name"

make directory “name”

$ ls -l

list all the files and folders in the directory

(-l)     use a long listing format
as the details mode in a location window

$ ls -l "directory-name"

is giving the list of the called directory

$ pwd

Print Working Directory
shows the actual folder content

$ cd ..

go one level up

$ if cd /somewhere; then date;

Only if there is cd folder called like so then show the date

$ echo mario > test/.secret

with the point on the new name it will create a hidden file that is  normally not shown in the interface and  in the command ls

$ ls -a

to recall a hidden file in a list  -a

$ echo /.*

will call also all the hidden files

./

it represents the current directory

../

it represents the parent directory
—————————

$ rm filename

remove file

$ rm /dir/

remove folder

$ rm -r foldername

empty the directory    (delete the files but keep the folder)
—————————-

$ set -x
$ set +x

set
start the behavior session
+
the commmand string is printed on screen before the execution

the command string session will not show anymore the command screen

$ echo foo | cat

“pipe echo foo into cat” write the info foo into the file and show the content (cat)
the 2 commands are connected to eatch other and have the same content

Report of Linux-works shell meeting in Vetomat 26.Juli.2010

Shell Basics Workshop Report n. 2/3 Juli 2010

comments Comments Off on Shell Basics Workshop Report n. 2/3 Juli 2010
By , July 20, 2010 03:24

>> nerdcafe Vetomat 19.7.2010        snufu/fuzzy speach, Zbog report
SHELL BASICS N°2

$ nmap 192.168.1.0

scan the local subnet to check for available hosts – nmap returns all IPs of running machines in the specified subnet. 192.168.1.0-100 scans IPs 1-100.

(you ll need to apt-get install nmap)

$ uptime

Shows when the pc started; how many users; load average; how many processes are running

$ date

gives you back a date and time

$ ncal

to call the calendar

#

Comment sign
to insert a not exacutable text, frequently used for human comunication instead of the normal typing in the terminal that is readed by default as a command to the computer

*

is a jolly to ask for existing files/Directory for example

$ echo D*

gave:
Desktop Dokumente…
(every file with the D as first letter in the directory where we are located)

?
$ fsdsf?

if you dont remember the last letter of a data
for example fsdfz
the command returns the possible files you are searching
like the asterisc but applies only on the last letter in doubt

$

the dollar $ itself
means a variable

|

the pipeline | between commands is to add multiple commands without writing multiple lines in the terminal

""

are to consider the string as text

$ rm filename

removes files – take care there is no restore the file will be deleted!

$ clear

clean the monitor terminal from previous output lines

$ iwlist wlan0 scan

scan for avalaible networks with network interface wlan0 (the 1. wlan card,usually)

$ ps

programs running by everybody

$ ps aux

more info about the running programs

$ ps aux | less

pipe the processes output into “less” – just for easy reading

>

to redirect and copy the command output to another program

>>

append
attach the output left of >> to the end of the file right off >>
for example

$ echo hiho > foobar
$ cat echo >> foobar

will give as output
foobar

foobar

<
\

(escape) to take out special meaning and read the value as text
example echo “mb\”r*” gives the output
mb”r

true is 0
and frequently in programming it is the opposite: true is 1 !!

$ wc

words count

$ wc -l

wordcount –lines

Report of Linux-works shell meeting in Vetomat 19.Juli.2010

Shell Basics Workshop Report n. 1/3 Juli 2010

comments Comments Off on Shell Basics Workshop Report n. 1/3 Juli 2010
By , July 15, 2010 03:20

>> nerdcafe Vetomat 12.7.2010        snufu/fuzzy speach, TKilla report
SHELL BASICS N°1

LinuxWorks workshop about Linux usage of the terminal.

Weekly appointment every Monday in Vetomat at 19:00. Scharnweberstrasse 35, F’hain, Berlin.

the “shell” is the program in the terminal,
–> Application –>Accessories —>Terminal
where you can run all the commands installed on the system
(the shell is called “bash” or “sh” or similar)

>> nerdcafe Vetomat 12.7.2010        snufu/fuzzy speach;  Tk report
SHELL BASICS N°1
———–

all lines in this text starting with $ can be executed in a terminal
watch the output of the commands!!  (almost) every error is written there!

useful commands:
TAB
Its enough to write few letters and use TAB key — multiple times —
to autocomplete the command!!

history:
arrow-up key     – goes back to the previous command
ctrl+r command    – search in command history

the format of the command is always:

commandname parameter1 parameter2 ..
programname -h          or
programname –help  for a long version

gives a short help and possible parameters of the command

$ man programname

manual of the program – RTFM – read this to know what it does 😉

$ apropos burn cd

tells which programs are doind the task

$ ssh user@hostname

login to another computer by console

$ screen -x

join a shared session (on another computer)
must be connected before to (ssh username@hostname)
screen runs multiple terminals (on a remote system) and you can switch between them

screen commands:
ctrl+a    a    – switch to another terminal
ctrl+a  ESC      – scroll with cursor keys

$ ls

list content of current directoy

$ ls -a

list –all: shows also hidden “.” dot-files (config files mostly)

$ less

shows 1 PAGE of output of a command  (contrast to “more” – that shows more 🙂 )

$ echo hiho > foobar

write hiho into the variable “foobar”

$ cat myman</pre>
<pre>$ tom

outputs the name of the var

$ cd /
"change dir" to root-dir "/"
"/" is the whole system - including all discs/partitions

$ cd    or  cd ~

“change dir” to your home dir “/home/yourusername/”,

$ echo foo > file1

write “foo” into a textfile file1

$ cat file1

print output of file1

$ head

show first lines of file

$ head -n 50

show first 50 lines of file

pipe command “>”

$ iwconfig > file1

write _standard_ output to file1

$ iwconfig > file1

write _serror_ output to file1 – “2” is the code for error outputs

$ echo ritual > fileX

add lines to file

$ echo ritual2 >> fileX
$ echo ritual3 >> fileX

connect terminal to remote window system

$ ssh username@hostname

connect to another computer and executes commands there

$ ssh -X username@hostname

activate X11 windowing forward on other computer

$ username@hostname: firefox

starts for example firefox on the remote machine and shows it on your screen

$ mv    file1 newfile

move file1 to another

$ less filename

show content of a text file

PONGuino – Arduino & S65 Shield – 2 Player MiniGame

By , February 12, 2010 19:36
PONGuino game on the MirrorBot v3 Hardware

PONGuino game on the MirrorBot v3 Hardware

I wanted a playable game to show the possibilities of the Arduino plattform in  workshops. Since I already have a S65-Shield built in a box with two joysticks, I wanted to use that MirrorBot hardware for presentation.

The most funny code I could find for the S65 Shield was a Pong game by

www.codetorment.com

This mod uses one axis of two joysticks – or two potis connected to input pins to move the two bats of the two players up and down.

The AI and encoder codes were removed and replaced by a similar check:

PONGuino 2 players in action

PONGuino 2 players in action

If the joystick potis are moved up or down, they decrease or increase the y position value of the matching bat.

If you have a s65 shield and would like to run this code, you could connect two potis to input pins (e.g. 0,1) and try those. Thes bats ‘should’ move, if you move the pots out of the center position.

I included a veeery simple level system:

PONGuino someone got a point +

PONGuino someone got a point +

After each round a level int variable gets increased. This level var decreases a delay() (starting at 10 ms)  in the main loop  -that way, so the game gets faster, the more rounds you play ( 5 times).

🙂

….

PONGuino mini-game intro screen

PONGuino game intro screen

Continue reading 'PONGuino – Arduino & S65 Shield – 2 Player MiniGame'»

Software Remote Control – Python GTk Servo Control

comments Comments Off on Software Remote Control – Python GTk Servo Control
By , November 28, 2008 01:03

MirrorBotGUI Servo Control Software

ServoControl - Transparent window, no decorations in python GTK / KDE

ServoControl - Transparent window, no decorations

The software interface  is a gtk-python program, which controls the movements by keyboard and graphical user interface.

We use this during live visual performances on a Asus EEE netbook, which is also running as a preview screen for the video mixer output.

There are 9 automatic programs to move the projections in different patterns across the wall.

9 automatic, BPM syncronized mirror movent programs

Servo Control GUI live visuals action on eeePC 701

Servo Control GUI live visuals action on eeePC 701

Program Types:

  • Scanner – up down movements in 5° or 10° steps, crossover and following
  • Hotspots jumping: various pattern between the 2x 6 hotspots: crossover and following,..

The intervals of the movements can be changed to match to the beat of the music in BPM. In manual mode, the mirrors can be moved directly by knobs, – so it can be used just as a live instrument.

This program is focused all the time and receives keyboard inputs. Often we move the buttons out of the screen to see only the display with interesting values (current mirror positions, program,BPM) of the bots.

Video Mixers + eeePC: -preview -ServoControl

Video Mixers + eeePC: -preview -ServoControl

The keyboard inputs are sent to the Arduino practically directly over serial by the python GUI. Button click events in the interface also send one char over serial line.

The standard Arduino firmware is limited: it can only receive one char at a time, so for receiving a string of multiple letters you need to implement a loop and wait for a terminating string. For this reason the  first version of this software could sent only “+” and “-” to change the speed, but not a complete new value (like “180” BPM) 🙂

Keyboard Shortcuts:

Servo Control GUI on eeePC in live VJ bpx

Servo Control GUI on eeePC in live VJ bpx

  • 0-9 : select program
  • “s” : start / stop
  • + : faster (+1 BPM)
  • – : slower(-1 BPM)
  • x : manual mode on/off

The python GUI  also reveives strings over serial from the Arduino and extracts the interesting values to display and then refreshs the text fields.

The data format sent by the Arduino is very short and simple, because the serial line is just fast enough to transfer:

  • short program descriptions (20 chars) – on program change events
  • current speed – every 100-200ms
  • beat tick – on timeout

Sending longer strings blocks the Arduino and it will not respond to serial input or loose some commands.

Luckily sending and receiving contemporary works just fast enough  and also python/Gtk handles input and output easily without threading.

btw: do not use to many (long) strings in Arduino or the RAM and flash memory is full soon, but its not that bad (specially with the 328) – this software, uses less than half the flash memory and ca. 1/4 of the RAM. (must check..)

Wiimote Control – Python Cwii Frontend

comments Comments Off on Wiimote Control – Python Cwii Frontend
By , July 12, 2008 17:10

Wiimote Control Frontend

This is a frontend to simplify the connection and configuration of a Wiimote and its bluetooth connection.

It is based on Cwii Library and can map axis and buttons of the wiimote to keyboard, mouse and joystick events

It has got different preconfigured modes for web-browsing, various games, TV remote control and presentations.

The config files define events like keyboard presses and map them to wiimote events, like button presses and controller values.

debian package coming soon..

MirrorBot Moving Projections System

comments Comments Off on MirrorBot Moving Projections System
By , June 8, 2008 05:23

Mirror Bots .: moving visuals projections – standalone & Linux GUI controller

This is a robotic system to move VJmix projections all over the walls.

Video: MirrotBot in Action Köpi, Berlin 11.2008YouTube Preview Image

Beamer projection reflection on mirror

Beamer projection reflection on mirror

Mirrors are mounted on servo motors to rotate them in front of dia projectors or beamers. This way, the projections are moved across the walls and the ceiling of the room.

A microcontroller system, connected to a netbook, is used to control the mirror-servo-unit movements.

“Hotspots” are defined to project on the best spots on the walls of the location and create an impressive light show of moving rays and projections on all walls and screens.

1.prototype live action with diaprojector & beamer

1.prototype live action with diaprojector & beamer

This system can be installed in rooms of any size.

It is required to use projection glass or there are double projections and very unsharpened results. The beamers must be powerful to show bright images also on the must distant walls. In big rooms, the projections are really big, so the 2 video mixes can work together as moving textures or moving characters.

The proof-of-concept system was first used by Headsquatter Live Visuals in Berlin @MIKZ – Suchtfaktor – 27.09.2008 with great success and continuously enhanced and tested live.

Hardware

We use a common, programmable input/output hardware controller to trigger motors: Arduino Dicemilia.

1.prototype live action - only left dia visible

1.prototype live action -- only left dia is mirrored

Two Mirrors are mounted on  servos to move them in front of two video beamers. This first version can move 2 projections with 2 mirrors on one horizontal axis between 40° and 130° – ca.  It  creates distorted projections depending on the current angle, but works very well with various kinds of video mixes. High contrast images and vectorial animations work specially good. By positioning two projections besides each other there appear many interesting possibilities.

Combined with fog machines the rays become visible and the moving beams look like a laser show with real videos.

The servo-mirror movements are synchronized to the beat of the music and many programs can be selected, to move the projections in various patterns.

VJ Live Mix Box: Wiimote - VJ mixer - Arduino Servo Control - Mirror (+ eeePC :) ) - Linux Netbook

VJ Live Mix Box: Wiimote - VJ mixer - Arduino Servo Control - Mirror (+ eeePC 🙂 ) - Linux Netbook

Software

This MirrorBot is controlled by a linux netbook over serial console via USB cable. The prototype is remote-controlled  by a simple software command line. Various keyboard key presses change program, speed, play/pause mode of the attached servo control box. This works quite good during live visuals mixes, with a mini terminal window in front of a TVtime preview screen of the video mixer.

Pictures by Rue23 in MIKZ 27.09.2008 – Suchtfaktor Party ::


more Pix @ 10247.net Logo

Multi projections

Multi projections

Multi projections

Multi projections

Multi projections

Multi projections

Debian and Tabstarter on the OLPC X0

comments Comments Off on Debian and Tabstarter on the OLPC X0
By , April 19, 2008 17:32

YouTube Preview Image
wow, the X0 OLPC looks really nice: a ruggedized mini-notebook.

the sugar desktop looks also very interesting, but at first glance it is too different from typical western computers interfaces to be intuitive for a european.
the home desktop screen is very inspiring, but we wonder: why is it all gray?
does that safe energy? 😉

it does not offer many programs and those which are installed take long to start.
they are mostly educational software and no games, except a memory.

we have a lot of ideas for this machine.. our tabstarter is already running on a Debian System.

there is a debian project that works on OLPC support and they released an installer.
its relativly easy to get X up and running, but it is slooow.
our tabstarter interface in Python GTK is working and we are testing out some programs now..

KidsLinux @Pinguincafe @LinuxTag, Berlin

comments Comments Off on KidsLinux @Pinguincafe @LinuxTag, Berlin
By , April 13, 2008 12:52

TabStarter – Easy Program Starter Intro Screen:

LinuxTag 2008 : Pinguincafe & Synoptx Action

We prepared 10 Asus eeePCs for the Childcorner on Linuxtag fair in Berlin.
The resonance on the fair was very good and people of all ages were interested in the hard- and software.

We installed and configured 2 different linux operating on 10 eeePC 701 netbooks

  • Debian Lenny Live from SD card
  • Geeentoo live from SD card

Both with a lot of modifications to support all of the hardware and include Wiimote, Joystick support and many more modules…

The grown-up nerds on linuxtag specially liked the 3D Desktop Effects as the rotating Desktop Cube and the wobbling windows.

Also geeentoo — live on SD card [ hacked by nerdpunk ]- impressed people, who know how much work it is to compile the wholes ystem with all extra-software included. The speed of application starts and running games on gEEEntoo was impressive.

Children liked Planet Pinguin Racer most: We had a wireless Joystick and 2 Wiimotes to control the Games. Smaller Childs started tuxpaint, that was hacked by Bognetti to include graphics and Sounds of a social project: plantanmptree.org in combination with motives of our City Game ‘Meta Friedrichshain’ – 10247.net

There were also many educational games such as gcompriss, knowthekeyboard and our 10247.net city game, including a memory and a trash-sorting game,specially created for children.

If we were Asus Premium Partners- and if the Linuxtag was not the _Linux_Tag, but a commercial fair 😉 we could have sold many of them, including our installer package:

A few machines ran on the original Asus, enhanced by our TabStarter v0.1to include the extra installed games, that had no icon in the original easy mode.

2 machines booted geentoo from SD card and the other 5 were running our preferred, optimized debian lenny system ::

We started by installing more games and educational software into the original Asus Xandros, Debian ‘etch’ , stable system, but the repositories of that system are limited and old, so there was not much to install. We found many distributions on the net, but all were just starting (march 2008) and did not support all of the hardware. So we followed all Howtos on eeeuser and later debian-eee-wiki, but there was no easy icon starter interface and no easy configuration interfaces.

Because we liked the EasyMode of Asus a lot, we started with something similar: Coded in Python GTK, we hacked a first version within a day and Bognetti included her graphics and created some icons then.

TabStarter Gtk v1:

The buttons start programs or websites. The big icons are easy to remember for children and easy to hit with the mouse. The big Category -Tabs have color codes and icons, so children can recognize the categories by the color and explore the system themselves.

Beginner Games Panel
Wiimote Control Panel
WordPress Open Source Blog System
SynOptX Lab Theme