01 May 2015

Raspberry pi setup wifi static IP

This is how I setup wifi on my PI :

In /etc/network/interfaces

auto lo

    iface lo inet loopback
    iface eth0 inet static
    address 10.232.1.81
    netmask 255.255.255.0
    gateway 10.232.1.1


    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 10.232.1.99
    netmask 255.255.255.0
    gateway 10.232.1.1
    wpa-passphrase password
    wpa-ssid myssid

I have tried everything using /etc/wpa_supplicant/wpa_supplicant.conf, it never works !!!

28 April 2015

Raspberry pi + ola server + art-net + spi output + WS2801 leds

I am running my leds on my raspberry pi now after using a lot the FastLED library on my arduino, which is fantastic by the way.
Here's how to setup the rpi :

Donwload latest ola image from http://dl.openlighting.org/
Write it on a SD card
Start your rpi with this SD card
login : pi / password : openlighting

sudo raspi-config

Enable SPI in advanced options + overclock to turbo

sudo apt-get update

sudo apt-get upgrade

sudo reboot

add the following to /etc/udev/rules.d/99-spi.rulesSUBSYSTEM=="spidev", MODE="0666"

write and run this script :
for pin in 17 21; do
  echo $pin > /sys/class/gpio/export;
  chmod a+w /sys/class/gpio/gpio${pin}/value;
  chmod a+w /sys/class/gpio/gpio${pin}/direction;
done

sudo reboot


To config your leds :
1. Go to http://192.168.0.XXX:9090/ola.html and click 'STOP OLA'
2. Open file /var/lib/ola/conf/ola-spi.conf
In my case, a string of 25 pixels is

base_uid = 7a70:00000100                                                                                                                                    
device_prefix = spidev
enabled = true
spidev0.0-0-dmx-address = 1
spidev0.0-0-pixel-count = 25
spidev0.0-0-personality = 1
spidev0.0-backend = software
spidev0.0-ports = 1
spidev0.0-spi-speed = 1000000

Go to OLA admin :  http://192.168.0.XXX:9090/ola.html

Click add universe 

Universe ID = 1
Universe name = 1
Choose artnet as input
Choose SPI as output
save

You should be ready to go, now pick a software that sends data over artnet, like Glediator or Jinx!


Sources :

https://wiki.openlighting.org/index.php/OLA_LED_Pixels
https://wiki.openlighting.org/index.php/OLA_Device_Specific_Configuration#SPI
http://luisgg79.blogspot.be/2014/03/ola-raspberry-pi-led-ws2810-artnet.html
http://grechi.it/blog/2013/11/02/blem-progetto-di-matrice-led-controllata-da-un-raspberry-pi/

I have also a pinterest board where I put stuff for inspiration :
https://www.pinterest.com/pimousse/neopixel/

Have fun !!!!


17 March 2015

The martian - book by Andy Weir

I just finished reading this book, and I have to say it's fantastic, if you like creative science and thriller, go for it !!!!

The Martian book cover

http://www.andyweirauthor.com/books/the-martian-hc

CFSpreadsheet in coldfusion 10 - what I learned today


I've been struggling with cfspreadsheet recently and here are a few things I learned.

At first I was adding rows to my sheets using the SpreadsheetAddRow method, which worked fine until I met data with special characters and punctuation.
One workaround when building the list of values was surrounding them with quotes, like this :

<cfset value = listAppend(values," ' The value, look a comma, eat it ' ")>
.
Until it crashed ... I found out that a value starting with a comma was breaking the code, no idea why but I didn't want to start escaping characters from the original data, time to find another way.

That's where SpreadsheetSetCellValue comes to the rescue :

<cfset SpreadsheetSetCellValue(sheet, anyValue, rowIndex, columnIndex)>

When you have cells with a lot of data and others with simple values, it messes the default vertical alignment, time to apply some formatting using SpreadsheetFormatColumns :

<cfset SpreadsheetFormatColumns(sheet, {textwrap=true,verticalalignment='vertical_top'}, columns)>

It looked better, but the columns have the same width by default (very small), resulting in very tall columns, so I searched how to autoSize the columns, like you would do by double clicking between two columns, here's the solution, it requires to use an undocumented method of POI.
- Make the first sheet active, like this :
<cfset mysheet = sheet.getWorkBook().getSheetAt( javacast("int", 0) )>

- Then for each column you want to autoSize :
<cfloop from="0" to="16" index='col'>
<cfset mysheet.autoSizeColumn( javacast("int", col) )>
</cfloop>>

To prompt the user to download the sheet, I used spreadsheetReadBinary :

<cfheader name="Content-Disposition" value="attachment;filename=Applications.xls">
<cfcontent type="application/msexcel" variable="#spreadsheetReadBinary(sheet)#" reset="true">

No more mystical error messages and now the spreadsheet looks nice when it is opened.

11 June 2013

Premiers pas avec la machine à découper Silhouette Cameo

J'ai récemment fait l'acquisition d'une machine à découper papier, carton et vinyl, et je dois avouer que je l'adore.  J'avais envie d'une découpeuse laser depuis un certain temps, mais le prix est encore très dissuasif, alors en attendant d'avoir les fonds je peux m'entraîner avec celle-ci, dans une certaine mesure.

A 300 euros, je ne prenais pas un grand risque et franchement je suis très content de m'être décidé.
Mon idée était de créer par exemple des décorations pour mon intérieur, m'essayer à faire des invitations, faire-parts, autocollants, et autres bricolages pour mon fils de 3 ans etc ... et surtout de trouver des idées en apprenant à l'utiliser. 

Voici par ex. un 'cubee' que j'ai trouvé sur deviantart ( http://browse.deviantart.com/art/Cubee-Blinky-166536484 )



Je l'ai vectorisé dans le programme livré avec l'appareil ( Silhouette Studio, très facile d'emploi, genre Inkscape ), 



ensuite imprimé sur mon imprimante jet d'encre et découpé sur la Cameo ( j'adore ce nom ), qui a des capteurs optiques permettant de calibrer la découpe sur le dessin, parfait.  Ca m'a pris en tout 15 minutes, et franchement le plus dur a été l'assemblage :)
Et voilà le résultat après pliage et imbriquage :



Pour ceux qui auraient la machine, voici le fichier .studio qui s'ouvre dans Silhouette Studio :
https://www.box.com/s/tm441yknmzdqc2ygd8xz

Et voici des photos de quelques réalisations que j'ai pu faire avec, je ne l'ai que depuis quelques jours et je dois avouer que je suis plutôt nul en dessin, heureusement tout s'apprend avec un peu de ténacité, et puis il y  a pas mal de matériel partagé librement sur Internet :)

Papillons imprimés sur papier doré
Découpe papier pour invitation

Découpe papier pour mon minus

Proverbe imprimé sur vinyl et posé au mur

'Plante' imprimée sur vinyl et posé sur le coté du meuble de ma cuisine

Enveloppe pour carton d'invitation 





25 April 2013

Hello Raspberry Pi

Yesterday, I finaly decided to get one of those Raspberry Pi every geek is talking about.
There are a lot of resources to get you started, the setup is pretty straightforward and involves only a few steps, it was just a matter of choosing which distribution to install, which depends of what you plan to do with it.
I plan to use my Pi to communicate with Arduino, so I installed the Adafruit Occidentalis distro, that has features for electronics ( http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-2 ).
5 minuts later, I was booting Linux on my TV, wow !
There is a config tool to get you started, very useful, I enabled SSH, downloaded putty ( http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html ), and connected to the pi remotely, now I can use my computer to go further.
Being a big Coldfusion fan, I installed Railo ( http://www.getRailo.org ), at first I tried the Tomcat way, lost a few hours, and finaly gave up, it was working but took 30 minuts to boot and took all resources.
The express install with Jetty is pretty straightforward and easy ( http://www.recantha.co.uk/blog/?p=2167 ), after a few minuts I had my Hello World running ( ).
I am really impressed by this cheap mini computer.
Tonight I will interface my Arduino, hopefuly :)

18 October 2012

09 October 2012

24 September 2012

05 September 2012

29 August 2012

28 August 2012

17 August 2012

blender emakina logo

Recreating the logo with bezier curves and trying different renders.



07 August 2012

Blender fluid




Mistery poison


I love milk

Blender Cycles - Fluid Inflow and glass material
1500 samples

Lens distortion



27 February 2012

Seriously.js

Seriously.js is a real-time, node-based video compositor for the web. Inspired by professional software such as After Effects and Nuke, Seriously.js renders high-quality video effects, but allows them to be dynamic and interactive.

Three.js

The aim of the project is to create a lightweight 3D engine with a very low level of complexity — in other words, for dummies. The engine can render using , and WebGL.

ASCII fluids

ASCII art on steroids

Dabblet


Dabblet, created by Lea Verou, is an “interactive playground” for trying out snippets of CSS and HTML code. It uses -prefix-free, so that you won’t have to add any prefixes in your CSS code, and you can save your work in Github gists, embed it into other websites or share it with others.

src

02 February 2012

Bootstrap, from Twitter

Un beau framework html avec de beaux petits composants :)

Bootstrap, from Twitter:

04 March 2009

24 February 2009