use Processing create retina sketch in OSX

Got a MBP with retina display in Culture Lab recently, I’m very happy about that. Only one thing makes me painful is the switch between my external monitor and MBP’s retina screen makes me quite uncomfortable.
I did some search about how processing/openframeworks/cinder works on retina display in OSX:
It’s much more simpler than other two. As its wiki showed (
what you need to do is just add two line
size(2880/2, 1800/2 , “processing.core.PGraphicsRetina2D”);
It’s kind of weird you need to divide the resolution by 2, and I tried saveFrame() for retina mode, it didn’t works.
You can find some info here:


hide status bar problem in iOS 7 & openframeworks 0.8.0

just find this issue when I’m testing my old sketches in iOS 7 – the status bar is always there even I tried all windowMode in, then I find answer here:
based on this, we can change a little bit in ofxiOS-Info.plist, add a row named “View controller-based status bar appearance” and set it “No”, then you can hide status bar in iOS 7 in openframeworks 0.8.0.
Haven’t test it in early openframeworks, but if it is keep using:
[[UIApplication sharedApplication] setStatusBarHidden:fullscreen withAnimation:UIStatusBarAnimationSlide];
it should have similar problem.


Difference between Gadgeteer and Arduino

Gadgetter is using STM32F405RGT6, the detail is:
ARM 32-bit Cortex™-M4 CPU with FPU, Adaptive real-time accelerator (ART Accelerator™) allowing 0-wait state execution from Flash memory, frequency up to 168 MHz, memory protection unit, 210 DMIPS/1.25 DMIPS/MHz (Dhrystone 2.1), and DSP instructions
Up to 1 Mbyte of Flash memory
Up to 192+4 Kbytes of SRAM including 64-Kbyte of CCM (core coupled memory) data RAM
Flexible static memory controller supporting Compact Flash, SRAM, PSRAM, NOR and NAND memories
LCD parallel interface, 8080/6800 modes
Clock, reset and supply management
1.8 V to 3.6 V application supply and I/Os
4-to-26 MHz crystal oscillator
Internal 16 MHz factory-trimmed RC (1% accuracy)
32 kHz oscillator for RTC with calibration
Internal 32 kHz RC with calibration
Sleep, Stop and Standby modes
VBATsupply for RTC, 20×32 bit backup registers + optional 4 KB backup SRAM
3×12-bit, 2.4 MSPS A/D converters: up to 24 channels and 7.2 MSPS in triple interleaved mode
2×12-bit D/A converters

General-purpose DMA: 16-stream DMA controller with FIFOs and burst support
Up to 17 timers: up to twelve 16-bit and two 32-bit timers up to 168 MHz, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input
Debug mode

Serial wire debug (SWD) & JTAG interfaces
Cortex-M4 Embedded Trace Macrocell™
Up to 140 I/O ports with interrupt capability
Up to 136 fast I/Os up to 84 MHz
Up to 138 5 V-tolerant I/Os
Up to 15 communication interfaces
Up to 3 × I2C interfaces (SMBus/PMBus)
Up to 4 USARTs/2 UARTs (10.5 Mbit/s, ISO 7816 interface, LIN, IrDA, modem control)
Up to 3 SPIs (37.5 Mbits/s), 2 with muxed full-duplex I2S to achieve audio class accuracy via internal audio PLL or external clock
2 × CAN interfaces (2.0B Active)
SDIO interface
Advanced connectivity
USB 2.0 full-speed device/host/OTG controller with on-chip PHY
USB 2.0 high-speed/full-speed device/host/OTG controller with dedicated DMA, on-chip full-speed PHY and ULPI
10/100 Ethernet MAC with dedicated DMA: supports IEEE 1588v2 hardware, MII/RMII
8- to 14-bit parallel camera interface up to 54 Mbytes/s
True random number generator
CRC calculation unit
96-bit unique ID
RTC: subsecond accuracy, hardware calendar

Then, for Arduino, it’s using ATmega328p
The high-performance Atmel picoPower 8-bit AVR RISC-based microcontroller combines 32KB ISP flash memory with read-while-write capabilities, 1024B EEPROM, 2KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare modes, internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, a 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator, and five software selectable power saving modes. The device operates between 1.8-5.5 volts.
By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.

So in general, we can see, Gadgeteer vs Arduino, the first impression would be: 32-bit vs 8-bit, 168MHz vs 20MHz, for flash, it’s 1MB vs 20KB, as for EEPROM, still dont know if STM32F405RGT6 has, but arduino’s is 1024B.


Smart Pedometer

Since the touch table version of my Music Box project finished, I’m always thinking about how to use this “synchronization” to make something user could understand easier, love to use and get more pleasure.
Surrounding the keyword “synchronization”, many designers tried to link “environment” and “sound” together to build an immersive space. As inspired by The Echo Nest, an online music analyze library which I used in my last music visualization project, I think we could create something running on mobile devices to help users enjoying their every day’s walking and jogging in a different way.
It is a simple idea: people would be happy if their motion and sound could be synchronized in a harmonious way.
So the user would use this app in this way:

1. Get some music, they select by themselves or get the system recommended after it analyzed your step information.
2. Select the playing mode:
A. Normal mode: play music in the same way with other music player
B. Enjoy mode: the system would select proper music to synchronize your steps at the moment.
C. Crazy mode: the user should set how long they wish to walk/jog, system would design an healthier way for the user based on the history data. For example, from slow to fast and then slow down. The music would do some remix using The Echo Nest to make them fit for users steps without the starts and ends of each songs.
3. Enjoy it!
(Don’t care about the mode’s name!)
This project would use Openframeworks for prototyping as well. Wish to see what would happen very soon!


Can’t use keychain in git?

When I’m trying to upload codes to github in an old Mac which running Lion 10.7.3, I found even I take the steps from git help and make the credential.helper really works, but each time when I push the changes on server, it continuously remind me to input the username and pass. I’m sure I have install the newest dmg installer from git, but when I check the version from Terminal, it tells me it’s still Then I found some answer from here:
So, to fix this problem, just do as steps list below.
cd /usr/bin
mkdir git.ORIG
mv git* git.ORIG/

Touch Table and MindWave

[youtube width="600" height="365" video_id="Km-MvGr0iX4"]
I take part work for this project as the touch table system using TUIO and supported on the neuro sensor.
Since my final project of MRes Study “Touchable Music Box” finished, I’m keep working on Kinect and relevant project until now, both from concept and practice, make creative art as an interactive things is quite an interesting and happy thing for me.