Marc's Public Blog


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Dreamstate | Edc | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Oshkosh | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips




More pages: November 2024 October 2024 September 2024 August 2024 July 2024 June 2024 May 2024 April 2024 March 2024 February 2024 January 2024 December 2023 November 2023 October 2023 September 2023 August 2023 July 2023 June 2023 May 2023 April 2023 March 2023 February 2023 January 2023 December 2022 November 2022 October 2022 September 2022 August 2022 July 2022 June 2022 May 2022 April 2022 March 2022 February 2022 January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980



2012/01/28 Trying out K1 Speed Indoor Go Kart Racing
π 2012-01-28 01:01 in Cars, Ncars
Jennifer got a groupon for us to go try K1 Speed Indoor Go Kart Racing in Santa Clara. Turns out it's a stone's throw from where Speedring used to be before it closed.

What's special about this place is that all the karts are electric.

So, what I thought about the place:

  • unfortunately, they use lead acid batteries, so they don't have the power to weight ratio I was hoping for. They were fast enough, but not as fast as other indoors gas karts I've driven.
  • the lack of noise is actually not bad, and the lack of fumes is good :)
  • they have 3 rows of cars and 2 charge while the 3rd one is used. That's not so bad.
  • the track layout is a bit basic (easy-ish), but eh, it's still fun enough to drive.
  • the kart max speed is remotely controlled. This is used to force you to do a slow lap and come back in slowly or stop everyone to walking pace if there was an accident. It's a bit spooky but I guess that makes sense.
  • karts have a reverse gear, that's cool since they help you get out of a tight spot without external help.



  • All in all it was different but still fun :)

    Jennifer is still lacking a bit of the aggressive spirit necessary to push people around who are blocking you, and making a spot where there isn't one, but her fastest clean lap wasn't that much slower than mine. She did well :)


    2012/01/24 Much Improved Pebble v2 Aiko Demo Code
    π 2012-01-24 01:01 in Arduino
    TL;DR: Get code here: https://github.com/marcmerlin/aiko_pebble_v2

    Note, you will need the LiquidCrystal_SR_LCD3 driver from the NewLiquidCrytal Library.

    You will also need the Aiko Library: https://github.com/geekscape/aiko_arduino .

    Pebble v2 requires at least the IDE 0.23 (untested) but 1.0 or better is recommended. The code is of course arduino 1.0 compatible.

    At the LCA 2012 Arduino Miniconf, we got to build a new toy, a Freetronics Pebble v2 (schematics here). This was a refresh of the Pebble V1 (schematics here) which was the target of the very first arduino miniconf I missed in 2010.

    This new Pebble had even more hardware to program against and was a much more compact design due to the use of a bunch of SMT parts (actually there are 2 arduinos on the board, one is dedicated to usb/serial communications, removing the need for an ftdi chip).

    Like good hacking projects and conferences, the design and software were improved until the last minute, and Andy worked all night before the conf to get us his demo code (along with bits from Luke and others).
    Andy wrote the very cool aiko event handler for arduino. You give it a list of callback functions and it'll do its best to call them on the interval you gave it (interval in milliseconds). For arduino folks, with Aiko, code looks like this:

    void setup(void) {
      Serial.begin(DEFAULT_BAUD_RATE);
      // Call LCD init early so that others can write to it.
      lcdInitialize();
    

    Events.addHandler(clockHandler, 1000); Events.addHandler(lightHandler, 1000); // Aim for 250 ms Events.addHandler(rotaryEncoderHandler, 100); Events.addHandler(serialHandler, 30); // Sufficient for 38,400 baud Events.addHandler(temperatureHandler, 1000); // Aim for 250 ms Events.addHandler(touchPanelHandler, 250); // Aim for 50 ms Events.addHandler(rgbLedFadeHandler, 10); // Can run slower. // Call LCD last so that it can display variables that just changed. Events.addHandler(lcdHandler, 1000); // Aim for 100 ms }

    void loop(void) { Events.loop(); }

    So Andy got us working code to test our hardware, but of course it wasn't fully optimized (hell, code never is). So, that gave me a chance to do some arduino programming to see what could be improved. It was a good learning experience.

    After a bunch of work, here is what I was able to do:

  • I happened to have RGB LED demo code I had taken a while to write over Xmas (nice transitions that I went through the trouble of writing so they would work with an Aiko event handler), so I did a bit more hacking to refine the code and plugged it in.
  • The rotary button was being polled every millisecond to catch which was it was turning. First I figured that every 5ms was probably enough, but thanks to sample code from Brett Downing, I was able to write a handler using hardware interrupts on input pin state changes (something I knew nothing about, so it was a good learning experience).
  • Then this brings us to the LCD handler. I had some grand view of writing a popup menu that would let you configure the code at runtime, but that meant a lot of LCD code. I knew arduino had a nice LiquidCrystal library, but it did not work with the shift register setup in the Pebbles. Long story short, I wrote a plugin for the Pebble/LCD3Wires shift register setup in the Pebble. This demo requires this new library (LiquidCrystal_SR_LCD3) to do its work.
  • Here is the end result:

    Again, the code: https://github.com/marcmerlin/aiko_pebble_v2

    Here's a quick man page :)

  • The 4th line shows the color that the RGB LED is changing towards
  • LED 6 means that the color change delay factor is 6 (lower means faster color changing)
  • 3 in LED 6/3 is by how much the color brightness is reduced (clips the color values so that they arne't too bright, mostly useful in dark rooms or when taking pictures).
  • LCD 80 is the analog PWM value for the LCD backlight (higher is brighter).
  • A few custom characters are displayed to show use of the custom character support brought by LiquidCrystal_SR_LCD3

  • pop up menu with selection cursor
    pop up menu with selection cursor

    backlight menu
    backlight menu

    LED color change delay menu
    LED color change delay menu

    Note that I as read on http://www.circuitsathome.com/mcu/rotary-encoder-interrupt-service-routine-for-avr-micros and have seen with multiple decoding errors in my rotary encoder test code (shown below), it is probably a good idea to add a couple of small caps around the encoder's feet:


    And that's it folks, that was fun :)

    Oh, actually I also made a repository of small demo code I wrote for the Pebble v2: https://github.com/marcmerlin/pebble_v2_demos .

  • Full_LiquidCrytal_Demo: This is my NewLiquidCrystal demo code writing for the 20x4 LCD on the Pebble V2.
  • InterruptEncoder_test: This is the standalone/debug interrupt code I used to test the rotary button interrupt code.
  • LCD3WireExample: This allows using the deprecated http://arduino.cc/playground/Code/LCD3wires library with the Pebble v2 (this was just to try it out, there is no reason to use this library, you should be using NewLiquidCrystal's LiquidCrystal_SR_LCD3 library instead: http://marc.merlins.org/perso/arduino/post_2012-01-23_LiquidCrystal-driver-support-LCD3Wire-hardware-_pebble-and-others_.html ).
  • performanceLCD: This is a port of Fernando's LCD example for Pebble v2.
  • 2012/01/23 LiquidCrystal driver support LCD3Wire hardware (pebble and others)
    π 2012-01-23 01:01 in Arduino
    TL;DR: Get code here.

    All the code is arduino 1.0 compatible

    After coming back from the Arduino Miniconf at Linux.conf.au, I ended up with a freshly soldered freetronics pebble v2.

    Like the Pebble V1 (schematics here), it uses MC14094 8 bit shift register to drive the LCD using only 3 wires instead of 6 or more.

    The Pebble designers thankfully used the same shift register wiring than shown on the LCD3wire page on arduino playground. However, the code that came with it only had limited functionality for talking to the LCD, and the code on the LCD3wires page is also limited in functionality (on top of being incompatible with arduino 1.0).

    So, I ended up finding Francisco Malpartida's cool work on virtualizing the stock arduino LiquidCrystal library (very featureful and optimized timings). In turn, Ragnar used that codebase to design his own shift register library for 2 or 3 wires.

    Ragnar's wiring and code is somewhat complex because it exploits some interesting hacks:

  • it is designed to work with cheaper non latching shift registers.
  • it can be made to work with just 2 wires instead of 3 for non latching shift registers.
  • because of the design, the code is less obvious and exploits some tricks, but it sure works :)
  • his code can work for latching shift registers, but I do not recommend using the more complicated wiring and code if you can afford 3 wires and a shift register. Just use the LCD3Wires wiring and the code from this page.
  • In other words, if you have a non latching shift register, use his code and wiring. If you have a latching shift register, you should use the code from this page and the more widespread LCD3Wires wiring.

    So, where does this bring us?
    I used Malpartida and Ragnar's work to make an LCD3Wire hardware driver for the NewLiquidCrystal Library. This brings full library support to the pebbles as well as other folks who use the reference wiring from LCD3wires.

    I called the new library NewLiquidCrystal in the hopes that it will become the new de facto library in standard arduino one day. My code is here: https://github.com/marcmerlin/NewLiquidCrystal and includes the new LiquidCrystal_SR_LCD3 driver I wrote. To be clear, all the code came from Francisco Malpartida's work, I built on top of it to write my LiquidCrystal_SR_LCD3.cpp driver for LCD3Wires compatible hardware.

    I also wrote an extended LiquidCrystal Demo which should work on all liquidcrystal supported devices (baring the character count).



    Here is a demo of my popup menu code that works with a rotary button (cursor showing what is currently selected if you click on it)


    I'm now working with Francisco to get my code included in his tree, and if we're lucky that code may eventually get included in the standard arduino libraries as a faster and more flexible LiquidCrystal replacement.

    2012/01/14 Visiting Ballarat, Australia
    π 2012-01-14 01:01 in Australia, Ntrips, Trips
    One new year, one new Linux.conf.au conference. This time I was off to Ballarat for LCA 2012.

    As a first time ever, I was lucky enough to get a 1st class seat for a flight to Australia (actually I'd have been happy enough with business, but that was not available). I still don't think it's worth the 'list price', but considering the quite reduced price I was able to get it for, it almost felt ok :)


    I setup a little office I could work in :)
    I setup a little office I could work in :)

    So what is there to say about Ballarat. It's a former mining town. The town itself can be visited in an hour or so (count a day to see the nearby attractions). All in all, definitely not something you'd fly from abroad to go visit, but since Linux.conf.au, my favourite conference, was there, so so was I :)

    Downtown had a few old buildings that were kind of nice:



    Ballarat's birds were loud but pretty :)
    Ballarat's birds were loud but pretty :)

    but the town was pretty sad. On a saturday afternoons, shops in their main 'mall' had closed by 16:00. I remember walking in front of a sushi restaurant that was supposed to close at 18:00 (on a saturday again), and they were closing early at 16:30 while giving me a 'sorry' look. In the end, there were only a very few places that were open for dinner.
    Oh well, it was not a big town, I just had to know that :)

    They had an old observatory with vintage telescopes, we went there one evening to do a bit of stargazing




    After the conference, I went to visit what seemed fun to visit. Bird World was a grandma and grandpa 'shop'. it could have been a lot of fun, but unfortunately their free flight cage net was broken, so they had to put all their great parrots in cages. It was a bit sad since I could tell some were very friendly and would have loved to interact with me.



    this one was so friendly and definitely wanted to come say hi
    this one was so friendly and definitely wanted to come say hi

    Next, I went to Sovereign Hill. This is actually the highlight of this town, a recreation of what used to be this old gold mining town. They have shops and blacksmiths like 150 years ago, and people dressed in the style of the day. Kids can pan for gold in the river.










    Someone also showed how they make gold bars:



    They had authentic machinery using steam power:




    They then had a night show that was a recreation of the mini insurrection that happened there against the British taxation. Too bad they got squelched by the British and never fought back after that.


    After a ncie visit to Sovereign Hill, I went to see the local Ballarat Wildlife Park. What can I say, I'm a sucker for Autralian wildlife parks (which I much prefer to zoos). It's always fun to be able to pet a few unusual animals like a wombat, and hand feed kangaroos or wallabies.
    While I didn't expect too much, at the same time I've actually been pleasantly surprised by such parks in the smaller towns, and that turned out to be true there too. Their crocodile feeding was particularly impressive, their kangaroos quite friendly, and petting wombats was cool :)


    this was a very cool layed back kangaroo, nice claws too ;)
    this was a very cool layed back kangaroo, nice claws too ;)



    food, for me? :)
    food, for me? :)


    kangaroo was friends with wombat :)
    kangaroo was friends with wombat :)

    food comma :)
    food comma :)

    those things peck hard when you feed them, they don't know any better :)
    those things peck hard when you feed them, they don't know any better :)









    The crocodile feeding was quite impressive:

    this guy really had balls, even by Australian standards :)
    this guy really had balls, even by Australian standards :)


    I hope he gets paid enough for this :)
    I hope he gets paid enough for this :)

    While it was a small town, the places to visit still made for a fun day.

    See more images for Visiting Ballarat, Australia
    2012/01/14 LCA/Linux.conf.au 2012
    π 2012-01-14 01:01 in Linux
    So this year LCA 2012 was in Ballarat. As per my Ballarat post. While it wasn't the most exciting city in Australia, I just spent more time at the conference itself and with my confernece buddies.

    Dinner with friends
    Dinner with friends


    The first day, we had the Arduino 2012 miniconf where we built the new Pebble v2:



    Jon Oxner, making sure one of the Pebble V2 was built correctly
    Jon Oxner, making sure one of the Pebble V2 was built correctly




    This gave me something to play with during the conference. I spent most of my free time hacking on my new Pebblev2 board after the fact and ended up writing a new lcd3wire library and a much improved Pebble v2 Aiko Demo Code.

    At the end of the conf, I went to the Hackerfest, where I got to write the rest of my code for my Pebble v2 :)


    Andy Gelme and I, riding in style, to the hackerfest :)
    Andy Gelme and I, riding in style, to the hackerfest :)


    Yeah, it works (mostly!) :)
    Yeah, it works (mostly!) :)


    John brought some samples from freetronix for us to play with, drool over, or buy and bring home :)


    But back to LCA 2012. They had some great keynotes (they were covered on http://lwn.net/). The keynotes are on youtube.








    The talks themselves, there were very some good ones. You cand find all the videos on the LCA 2012 youtube channel:













    Two of the speakers sent one of their probes to near-space with a helium baloon after their talk:


    And to finish a few random pictures of dinners and evenings:





    That T-shirt is so full of win :)
    That T-shirt is so full of win :)



    Mikal came at the end of the conference to tell us about next year, and he's going to be the poor sob who's going to run it next year. Beat of luck Mikal :)



    And just like that, the conf was over:


    As always, LCA was a very well run conference, and despite the choice of a location that was very inconvenient (the uni itself being too far from whatever already limited city center was available in Ballarat), I had a great time again. In the end, it's still about the people, the conference, and the speakers.

    See more images for LCA/Linux.conf.au 2012
    2012/01/09 Pictures from CDG-SFO Flight
    π 2012-01-09 01:01 in Flying, Nflying
    On my flight back from Paris, we had an interesting flight path that was just at the edge of the sun coverage of the earth. As a result we skirted the line of sunrise for about 30mn over very northern canada, and it yielded some great pictures, even if they were a bit hard to catch through a plane window:





    Back in SFO:




    See more images for Pictures from CDG-SFO Flight
    2012/01/08 Google Logos
    π 2012-01-08 00:00 in Google
    I've been collecting pictures of Google Logos framed in various offices I've visited over time. Here are my favourites since I've been at google:




















    See more images for Google Logos
    2012/01/07 Another Yearly Dutch Family Gathering
    π 2012-01-07 01:01 in Family
    Jennifer had to go home early due to work (which then became a small surgical procedure), but I stayed in Paris and worked at the office there so that I could be there for our yearly Dutch family gathering. Most people made it, it was nice to catch up:












    The next morning, we stayed at the same bed and breakfast we have been staying at these last years:






    I swear, this picture looks just like the same than last years :)
    I swear, this picture looks just like the same than last years :)



    for old times' sakes I went to catch one of her farm chicken
    for old times' sakes I went to catch one of her farm chicken


    2012/01/03 Sneak Peak at the new Google Paris Offices and working from Paris for a week
    π 2012-01-03 01:01 in Google
    Like last year, I worked out of the Paris office for the first week of January (waiting to go to Holland for the following weekend). Unfortunately the new Paris office, while announced, wasn't quite open for business yet: we had some people there, but the building is still being worked on heavily, so most people have not moved yet.

    I went for a quick visit and took a few pictures:




    After that I spent the rest of the time in the 'old' office:

    main cafetaria is still small, but very nice
    main cafetaria is still small, but very nice

    people hard at work :)
    people hard at work :)

    hard at work, still :)
    hard at work, still :)

    on friday we did gallette des rois
    on friday we did gallette des rois


    2012/01/01 New Years with Francois et Martine
    π 2012-01-01 01:01 in Family
    Since we were obviously starving by now with the very limited food we had been able to get so far :), François and Martine had us for New Year's lunch.







    More pages: November 2024 October 2024 September 2024 August 2024 July 2024 June 2024 May 2024 April 2024 March 2024 February 2024 January 2024 December 2023 November 2023 October 2023 September 2023 August 2023 July 2023 June 2023 May 2023 April 2023 March 2023 February 2023 January 2023 December 2022 November 2022 October 2022 September 2022 August 2022 July 2022 June 2022 May 2022 April 2022 March 2022 February 2022 January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 October 2003 August 2003 July 2003 May 2003 April 2003 March 2003 January 2003 November 2002 October 2002 July 2002 May 2002 April 2002 March 2002 February 2002 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 May 2001 April 2001 March 2001 February 2001 January 2001 December 2000 November 2000 October 2000 September 2000 August 2000 July 2000 June 2000 April 1999 March 1999 September 1997 August 1997 July 1996 September 1993 July 1991 December 1988 December 1985 January 1980

    Contact Email