Humble Bundle Linux Windows Save Sync

As a Humble Bundle buyer, I noticed the need for linking my Linux saves with my Steam saves (yes, unfortunately we still don’t have Steam for Linux). Thus, my quest to find all the saves begun. Here are my findings:

Continue reading

Posted in Games, Linux | Tagged , , , , , , , , | 4 Comments

My First AVR Circuit II: Source Code

All that is left from the Part I of this tutorial is the source code. Here it goes, a simple code with well explained comments:

// Define the internal oscillator to run at 1MHz0100000
 #define F_CPU 1000000UL
 // Include some helpful libraries.
 #include <avr/io.h>
 #include <util/delay.h>
 int main(void)
 {
 DDRB = 0xFF;    // PB0-PB7 output
 DDRD = 0xFF;    // PD0-PD6 output
 PORTB = 0x00;    // Set all PortB pins low
 PORTD = 0x00;    // Set all PortB pins low
 _delay_ms(1000);    // Wait 1 second
 while(1)
 {
 PORTB = 0x40;    // Same as 01000000. That means that we light up led 6 from port b.
 _delay_ms(500);
 PORTD = 0x40;
 _delay_ms(1000);
 PORTB = 0x00;    // Turn off all leds.
 _delay_ms(500);
 PORTD = 0x00;
 _delay_ms(1000);
 }
 return 0;
 }

You can build the code using the instructions posted on this blog (Windows, Linux). If you prefer, click here for the already compiled hex file.

Here’s how it should like after you turn it on:
[youtube http://www.youtube.com/watch?v=lzX-eIkcMW4]

Posted in AVR, Electronics, Tutorial | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

My First AVR Circuit I: Parts and schematic

Well, well. Now that you know how to write, build, and flash your code, we can start making our first circuit! Traditionally, in the coding world one prints on the screen the classic “Hello World!” message. In electronics, due to the lack of the “screen”, we just blink LED’s! “But what do I need to get to do that?”, you ask? Here’s a short list for this small circuit, in case you are starting from the ground up:

Picture with electronic components

Sorry about the extreme low quality. Cell phone!

1 – AC/DC Adapter or some kind of DC PSU (not pictured)
2 – Breadboard
3 – L7805CV (bottom left) – Optional, but it’s a common usage component, and it won’t hurt. It’s used to make sure that your circuit only gets 5V, even if your adapter freaks out and puts 12V on your breadboard. Must have if you are using cheap adapters
4 – 150 ohm resistor for the power led
5 – 3 mm LED’s (I used 2 red and 1 green)
6 – The trusty ATTiny 2313A
7 – 20 pin socket (bottom right) – Good if need to move your IC around, and want it to have all it’s legs in the end of the day. Continue reading

Posted in AVR, Electronics, Tutorial | Tagged , , , , , , , , , , , | 1 Comment

Coding for AVR II: Writing and Building on Linux

Since we already know how to turn our code into hex in Windows, we should also know how to do it using the best OS around: Linux. Please be aware that while the instructions here have been tested in Linux Mint (Ubuntu/Debian based), they should also work with your favorite distro.

First and foremost, you should write your code in a text file, in your favorite editor (or IDE, if you prefer). For simplicity sake, I’m using the default gedit. After that is done, you should install avr-gcc and it’s dependencies. avr-gcc is the most used c and c+ avr compiler around, and includes some really useful libraries.

sudo apt-get install gcc-avr avr-libc

Continue reading

Posted in AVR, Electronics, Tutorial | Tagged , , , , , , , | 1 Comment

Coding for AVR I: Writing and Building on Windows

As you might recall from the last post, we can flash hex files on our AVR. But what are hex files? Hex files are “machine language” instructions for your AVR’s. With this, your chip knows how to respond to inputs just like you want it to. It’s the same as the .exe is for Windows. People with knowledge in programming and building your code can probably skip this post, since it is likely that you already know all this.

To write our code, and obtain our hex files, we’ll need some tools to work with. These tools depend on your choice of operating system.

Continue reading

Posted in AVR, Electronics, Tutorial | Tagged , , , , , , | 1 Comment