Close

Hello World!

A project log for Cruise Control Preset

This project supplements the existing cruise control in a vehicle, allowing you to automatically set the cruise control to a selected speed.

scott-hammerschmidtScott Hammerschmidt 05/08/2015 at 16:470 Comments

In the previous log I mentioned that I had gotten the test Hello World file from the u8glib library to compile in Atmel Studio, but I had to include all the various library files in the project. I revisited that, looking at how I could use the u8glib as an actual library.

The u8glib wiki has a page about using with the AVR. Under the Install section, it links to the instructions for the m2tklib. I followed those instructions for building a static library, but stopped at the Create Example Project part. I'd like to reuse this library for multiple projects and don't want to have to rebuild it each time I have a different Atmel Studio solution (although you do have to define F_CPU, so you'd need to rebuild it if you were using it on a board that ran at a different frequency). I built the project as it was, and then went back to the solution I used originally (where I added all the library files I needed individually to the project). Deleting all of the library files from that (just keeping the hello_world.c file), I added the libu8glib.a as a library (this was just a guess). I tried building it, and it completed. No warningd, no errors. Which made me suspicious. :)

I didn't have time over that lunch break to program it, so it had to wait until last night. I programmed the board (after soldering an ISP header to the breadboard shield), and it worked!

So I think I've pretty much used up all the good luck on the project right there. I suspect from now on small advances will require tons of work. A few guesses on how to do things and it all works out just like it should? I'd like to take credit for getting it all to work, but I think it was just luck. But I'll take the luck.

Now I need to think through what my next step is. I'll probably make the changes that display the '65' like I had previously working with the Arduino environment, but that should be quick. Next I'll probably work on connecting the GPS to the AVR and parsing the data that it gives me. With my display working I'll have a nice way to see that it's working properly.

Before doing that, though, I'm going to read through the u8glib page a bit more. I think the Google Code layout makes it look less documented than it is. Finding the great steps to make a library hints that it's probably documented well. I'm not sure if I'll use the associated m2tklib in my project, but I'll have to look it over so I know what's available. Some neat stuff there, I think.

Discussions