Author Archives: aisotton

Script to convert images to C arrays for the Newhaven NHD-C12832A1Z-FSW-FBW-3V3 LCD

If you are using the NHD-C12832A1Z-FSW-FBW-3V3 LCD, or another LCD based on the ST7565R chip, you may have ran into the issue of converting image data into a format suitable for sending to the display. It’s a bit strange because the display is addressed using a page/column scheme, with each byte representing a slice of 8 vertical bits.


This python script does the necessary conversion. It reads an image and outputs a C array that you can paste into your program. Use it at your own risk.

Sample output:

/* hw.png (128x32) */
uint8_t data[512] = {
 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, /* and so on ... */

Australia, part 3 – the end

January 9: the last day. I’m leaving on the 10th, at 5 in the morning. Happy and sad, it was a great trip. Anyway, we hiked around Danbull national park for a couple of hours (and almost got lost), then drove down to Cairns. The brakes of the van started squealing when I drove down the mountain, even though I was driving as fast as possible to avoid using them. Needless to say, Barbara was extremely pleased by my great concern for her brakes.

We arrived in Cairns and checked into a hostel, and spent a couple of hours drinking beer and setting up an ad for her campervan, which she’ll sell once she’s back in Sydney.

When we were done it was past 10, and we wanted to go out for dinner. Barbara insisted that everything would be closed, which I didn’t believe. I drove around for almost an hour, and every place listed as open on Google maps or Yelp was either closed or had moved. When I parked at the last place, I noticed a parking meter, and wanted to park somewhere else to avoid paying. I pulled out quickly to get in before traffic, and promptly hit the parking meter, causing a massive dent on the side of the van she had just listed for sale.

I’m sorry Barbara!


She took it with style.

We went back to the hostel and cooked spaghetti.

Thanks for a great trip, Barbara!

January 8: after a short hike through the rainforest around Crocodylus village we took off southbound and crossed the river again on the ferry.

We drove away from the coast into the Tablelands – along the way we bought some Mango wine, and I bought an Akubra hat from a small store with a very nice owner. Very fittingly, the model is the “Tablelands” – the new model from Akubra, as the owner assured me. I feel so fancy.

He didn’t have leather hats though, so Barbara still has to get one later.

The campground was a pretty nice place on a lake with a lot of birds and a breathtaking night sky.


And here is the tarp construction which allows us to breathe at night:


I have been called a “knot nazi” because I insisted on using proper trucker’s hitches to tension the tarp. Knot nazi! Me! The nerve! There is even a song about the trucker’s hitch.

January 7: some pictures of Crocodylus village (sadly no crocodiles, again). If you are in the area: go there.



The snorkeling tour to the great barrier reef was amazing. Two hours in the water are exhausting, I had blisters on my feet from the fins. My camera isn’t waterproof, so no pictures from there. I saw a couple of turtles and stingrays as well as countless colorful fish – Barbara missed the turtles but saw a shark instead. We stayed at the Crocodylus Village for a second night.

January 6: We left from Babinda, passed Cairns and took a ferry to Cape Tribulation. Not a very promising name, but we checked into a hostel called Crocodylus Village, built into the rainforest. Absolutely fantastic, a magic place. No pictures except of this Gecko climbing onto a glass with a candle in it:


Again, the people were incredibly friendly and helpful. We booked a snorkeling trip to the great barrier reef for the next day.

January 5: We heard howling in the night – possibly Dingos. We didn’t see any, though. After breakfast (bacon and eggs again) we hiked down to the bottom of the falls – here’s a pretty big spider we found on the way:


It was very wet and rainy and we were glad that we listened to the ranger and wore proper shoes. The falls are impressive, totally worth checking out!


We then drove until Babinda where we camped and used our new tarp for the first time. It was awesome.

January 4: The next morning we got up and I went for a hike from Alligator Creek to Crocodile Creek. Promising names, but no crocodiles. I saw some green ants assaulting a black ant, though.


The whole area is very beautiful and has some really nice creeks and strange white trees – they almost look like they have been painted.



We set off and went checking out the Tyto wetlands near Townsville, and got some information from the local tourist office. The people there were extremely friendly and helpful. The wetlands had a lot of birds and insects crawling around, plus a few crocodile warning signs. Again, no crocodiles, but lots of birds.


We stopped in Townsville to buy a bigger tarp. The best investment of the trip – we can now finally sleep with the tailgate open, even when it rains!

Then we went drove to another camping spot near the Wallaman falls in the Girringun national park, a 300 m waterfall which is one of the highest of Australia.

January 3: We drove to Proserpine near Airlie Beach where we stopped at a bakery with very good donuts and the baker with the world’s angriest face. Barbara wanted to book a sailing trip to the Whitsunday Islands for her way back – finally she was able to do so over the phone, so we didn’t have to drive the additional 70 km to Airlie Beach. The next stop was Ayr (how is that pronounced? “Air” or “Ire” or something else?) where we went to a camping store to buy hats. The store had the right kind of hats – we could see them through the window – but it was closed.

So we went further into the Bowling Green national park, where we had to get a permit over the phone. It took a while but Barbara got it done somehow. There were a bunch of wallabies and bush turkeys running around – this time I got a picture!



It rained like crazy all night long. We had to close everything, again, but at least it was a bit cooler than last time. We started discussing options on how to improve things for the future, and decided to buy a bigger tarp.

Australia, part 2

Jan 2:  I don’t remember much of this day – we drove until Carmilla. We have been driving on the Bruce Highway for days. Every time I see a “Bruce highway” sign I have to think of Monty Python’s sketch about Australia. We met a nice but slightly passive guy named Mick at the campsite. He told us that the plantations we drove through the whole day are macadamias.

Jan 1: We got up pretty late and quite hung over. Barbara didn’t sleep very well and was even grumpier than usual.We decided we need to get some hats. I wanted an Akubra hat, and Barbara some Crocodile Dundee-style leather hat. Apparently we had just passed pretty much all of Australia’s biggest hat suppliers (for some reason they’re all around Gold Coast and Brisbane), but we started looking for them. We went to multiple stores, but they all were either closed or didn’t have what we wanted. We drove until Agnes Water where we camped. There were some very strong winds and rain during the night, so we had to close all doors and windows of the camper. It got very stuffy and hot inside, very hard to sleep.

Dec 31: Barbara scheduled to come back in the evening. In the morning, I drove over to Tin Can Bay. It is a very flat bay which is strongly affected by the tide. I arrived in low tide, and walked out onto the beach between stranded boats and seagulls pecking worms out of the ground. Pretty nice.


I also found out that you can use the camper on the hostel parking lot for a small fee.

When Barbara came back, we did laundry at the hostel and then spent the evening drinking beer at the hostel bar until shortly before midnight. An Australian dude showed up who spends his life driving around in his 4×4, going on the beach, catching fish and crabs, and drinking beer. For reasons unknown to me (and to any reasonable person), Barbara suspected that his 4×4 had a very high fuel consumption, thus being very unfriendly to the environment. She demanded numbers and insisted that they be metric, not imperial. The Aussie called her a German accountant, but agreed to the demands saying “Darling, I’ll give you the raw data”. It quickly became obvious that neither of them knew how to calculate fuel efficiency though, and they came up with some boneheaded numbers. I wisely stayed out of it and kept drinking beer.

There was a “white party” (where everyone wears white) for new year’s eve going on at the local party place (a pub with a mini casino inside). All the local bros and broettes were going there, so we went to the beach instead with some dutch people we met at the hostel. This was a great decision – at the beach we found another party organized by some locals (free and with no dress code) and we danced and drank beer until it was over. New year is much better in summer.

Dec 30: I still had a couple of blisters on my feet from the previous day, so I decided to take it easy. I spent the day going to the beach and drinking beer at the hostel bar and other places. I slept at the hostel again.

Dec 29: Got up early (6 or so) and dropped Barbara off at the hostel. I spent the day doing a 20 km hike through the rainforest to nearby Poona Lake. Totally worth it, the forest is amazing.



The water of the lake was slightly red – Barbara later told me that this is because of the eucalyptus leaves.


I checked into the hostel for two nights because I didn’t feel like driving back to Inskip point, and had a couple of drinks there in the evening. This was a party hostel, and I was reminded of the fact that I’m not 20 any more.

Dec 28: Drove to Rainbow Beach, where Barbara wanted to go to Fraser Island. Stopped at a hostel called the DIngo’s. While Barbara was inside getting briefed, I got a camping permit for Inskip Point. We didn’t go there though, and slept in the camper parked in front of the hostel. At midnight, security kicked us out, and we drove to Inskip after all. I think it would have been a nice place during the day, but we couldn’t see much of it.

Dec 27: Rachel drove us to some nearby waterfall with no water. We then left and drove to Brisbane, where we met my friend Gwen and her girlfriend Leigh. I hadn’t seen Gwen in about seven years, but they let us sleep at their place. We went out for dinner in Brisbane – the weather still sucked but the dinner was nice. I should have taken a picture with Gwen to see the progression over the last 5 years. It was fun to see her again after such a long time, I never thought this would happen. For your entertainment, here’s a picture from 2009, somewhere in Golden Gate park in San Francisco:


Australia, part 1

December 26: We went to Byron Bay. Barbara tried to book a trip to Fraser Island, but it didn’t work out. The beach was fantastic:


We walked down to the beach and saw the lighthouse in the distance – “20 minutes”, said Barbara. I said it was going to be longer, but to be honest I didn’t expect it to take an entire hour as it did. On the plus side, the views were fantastic and I saw my first wallaby (a small kangaroo).



Later on we went to visit Rachel, a friend of Barbara. We were over two hours late, but she was cool about it. She was staying up in the hills above Byron Bay in an absolutely fantastic house that used to belong to the jazz singer Grace Knight. The house was aptly named Grace House. It’s encompassed by the forest, and we sat on the covered patio for hours, drinking beer, listening to the crickets, and watching the heavy rain come down. And listening to some Grace Knight. Here’s an example.




December 25: Pretty boring day. We drove until the outskirts of Byron Bay and camped in a large RV park.

December 24: There was some commotion during the night. In the morning we spoke to the Germans again – the ranger had come in the night and given them a fine for the dog and the fire, and kicked them out because of the dog. One of them apparently spent the night somewhere else with the dog. They were back with the dog, but hadn’t started another fire yet.

We had bacon and eggs, and went to a place called Seal Rocks. There were rocks there, but we saw no seals.

Nothing very interesting happened after that – we drove to Macksville where we camped near Warrell Creek, a small river with shark warning signs. We saw some other people in the river so we went in too. Nothing happened.

Barbara drives very fast on paved roads, but somehow her courage disappears immediately as soon as unpaved roads start. I have no idea why. I tried to encourage her to go faster, to no avail.

December 23: Breakfast with an Austrian friend of Barbara who brought some homemade cookies of his mother. Excellent cookies. We finally got started at noon – here’s Barbara’s mighty machine:


We drove up to some national park, where we camped. At the campsite we met some Germans who had a campfire and a dog just in front of the “no campfires” and “no dogs” sign. The night before they had been kicked out of another national park for having a dog.

We used the public barbecue to make some steaks and potatoes. It was a pretty nice evening.


December 22: Arrived in Sydney, where Barbara picked me up at the airport. I spent the day looking at the standard Sydney sights – later we had dinner in Newtown near Barbara’s place.

DSC00131I like the large parks in Sydney – pretty walkable and with some nice trees and birds, but horrible Christmas decorations.


Day 3: Death Valley (last entry)

The night was incredibly windy. I had to get up at and tie the tent down because I feared it might collapse. The stakes did not hold in the sandy ground, so I found some rocks and tied the tent to them instead. On the plus side, the wind swept all the clouds away, and the night sky at altitude and away from any cities or towns was breathtaking. I tried taking some pictures, but they didn’t come out well – I was shaking too much from the strong wind and the cold.

I’m very impressed how well my $140 budget tent works though – it’s been all around California now and hasn’t let me down yet (I haven’t had any strong rain in it yet, though). Kelty Salida 2, highly recommended as a solo tent (too small for two people, unless they like each other very much).

I had arrived in the dark, and only saw in the morning how beautiful the area really was.


My spot for the second night. Note how the tent is tied to rocks – it’s incredibly windy.

I cooked breakfast (oatmeal again), packed up and left with destination racetrack playa (one of the main attractions in the death valley, more on it later). On the way, I met some French Canadians and tried my best French on them “c’est la premiere fois en the death valley pour vous?”, which they did not understand. I guess my accent isn’t as great as I thought. After a few attempts we managed to exchange some niceties.

When I finally made it to the racetrack playa (a few hours away from my camping site), I met a Spanish film crew who was producing a TV show starring a guy on a motorcycle riding around in many places in the world. I was a bit disappointed that he proceeded to ride on the racetrack (you’re not supposed to take vehicles on it, because it ruins it), so I left.


Spanish film crew producing a motorcycle show

The racetrack itself is truly a sight to be seen. You can see the tracks of the rocks which have been moved around by the wind when the playa was frozen – apparently a phenomenon unique in the world, and immersed in an incredible scenery. The pictures do not do it justice.

DSC00110After a while I had enough and decided to do Lippincott pass. I had read that it was quite a tricky road, and it had a big and scary warning sign.


It turns out that it was far shorter and easier than anticipated – the roughest road I did on this trip, but by far not as bad as I had expected. It was followed by 30 or 40 miles on unpaved, deserted roads through an incredible scenery until I made it back to highway 395.

DSC00117Once I was back on 395, I took the shortest path to Bakersfield, where I stayed at the “America’s Best Value Inn”. Nothing exceptional on that part of the ride, except that it started out warm and sunny, and ended in the freezing cold.

This is the last entry for this trip – the next day is just the journey back from Bakersfield to San Francisco.

Update: this is a map of the complete route: