Virtual Ubuntu vs. Native Ubuntu

In the past, I had always run Ubuntu native on a separate computer, but a friend informed me that it was possible to emulate the software itself while running Windows or a Mac.

After some research, two products were generally used to do this: VMware Player and Oracle’s Virtualbox.  I decided to go with Virtualbox arbitrarily, but after installing it, the Ubuntu was very laggy and not very fun to play around with in a GUI setting.  The CLI worked alright though.  I then decided to try installing it using VMware Player it was much better–no lag.  Not sure why, but because of this experience I would recommend using VMware Player.

Having Ubuntu running virtually is pretty nice though, especially since I can now copy one thing from my Windows and paste it in the Ubuntu machine.  Also, there are file sharing options where both machines can put files in order to transfer them, but I’m thinking just sharing a Dropbox folder on both machines would be easier if the files aren’t too big (and for this class, they probably shouldn’t be).

First impressions of Ubuntu

So far, Ubuntu seems to be pretty much like a mix between Mac OS and Windows.  There is a program dock on the left side, and familiar windows open when I click on them.  A big difference I have noticed so far is that the directory goes back to home instead of desktop.

In class we had a group exercise of trying to teach each other about 35 basic command line commands.  I thought the exercise was a bit of a hassle, considering some people didn’t really do any work before hand.  Also, not enough time was really given to really learn all 35 commands well in 20 minutes.

Fixing a Gateway FPD1940 LCD Monitor

About a month ago my giant monitor broke.  The power light had been flickering for some time while turning on before it went bad.

I had owned the monitor for over 9 years, so I wasn’t that disappointed when it finally broke, but when I looked to buy a new one, I found that there were no good options for 4:3 ratio resolution monitors.  They were all too expensive or smaller than my old one!  All the new ones for sale are in widescreen (16:9), and I didn’t like that.

Any electronics guy will tell you that most problems with LCD monitors have to do with capacitors going bad.  I opened up the monitor and saw that none of the caps looked burst or bent… shucks!


At this point, the monitor was not worth fixing it wasn’t the caps.  Considering there were only about 10 caps, and the caps only cost about 10 cents each, I went for it.  Caps don’t always have to burst or bend outward when they go bad.

The soldering for this job was a pain the ass.  When repairing monitors, it’s important to keep track of where all the stuff you take out needs to be put back in.  The same exact rated capacitors must be put back in (although it’s okay if the voltage rating is higher on the ones you put back in).

And guess what…

It worked!

Needless to say, if your monitor stops turning on and you know how to solder, it’s definitely worth replacing the capacitors.

Now I just hope this monitor lasts another 9 years.

OBD-II Reader for Scion TC

Last semester I had to design a CAN-BUS transceiver to read OBD-II codes using a PIC microprocessor.  I never actually got the chance to hook up to a car, but I figured this summer I would finally get the chance.  And today I discovered that my car doesn’t even have a CAN-BUS!

Slightly discouraged, I knew there had to be a way for the car to output OBD-II data (this has been a requirement in the US since 1996).  That was when I learned about the ISO K-line.

A project was started about 5 years ago, called OBDuino, and I hope to use that resource as much as possible to get a real time OBD reader going in my car.

Thoughts on Poetry and Verbatim Memorization Techniques

For a long time, I’ve been trying to figure out the best way to efficiently memorize poetry (including capitalization and punctuation, since this is what is required at the US memory championships).

I think I’ve finally come to the conclusion that the best way to do it is to have pre-memorized images for common words.  Words like the, a, an, but, or, so, etc.  Also, if there is a period or a capital letter, one should have pre-set images for that as well, interacting with the word.

The word itself can actually be an image of whatever the word is, if it is a noun.  Verbs and non-concrete nouns could be trickier.  For example, how would you try to memorize “fearful”?  How would you go from “fear” to “afraid” to “fearful”.  I guess I would try to break down the word further.  There is both “fear” and “ful”.  ”Ful” –> “full”, so perhaps a bunch of screaming kids afraid of being forced by their mothers to eat more because they are already so full.  They’re so full they’re puking up everywhere around the room while screaming how fearful they are.  You get the picture, hopefully.  Heh.

So I think right now the best way to do it is would be to have a one locus for each word, including punctuation and grammar.  By merit of having nothing else in the locus, that would mean a space, which makes intuitive sense.

I guess for words like a and an those could be including with a word’s locus, too.

Interesting…more later.

I2C (TWI) Communication Between Arduino and an LCD Screen

Yesterday I started this project and I just now finished it.  Here’s the end result, a screen that can print anything I want:

From a hardware standpoint, these two devices have to be connected together in a certain way.  The screen needs a 3.3V power voltage to turn on, which the Arduino conveniently provides.  The screen also needs to be grounded, so that’s the black wire to the Arduino.  I2C works by using two more lines, SDA and SCL (for the data you want to send and the clock timing for that data, respectively).  SDA is the A4 pin and SCL is the A5 pin on the Arduino Uno.  So once you hook those 4 wires up to their right slots on each component, you’re good to go other than setting two jumpers on the side of the screen to configure the screen for I2C and not some other protocol (I may try a different protocol later on to see if I can get it to work, such as UART).

From a software standpoint, the Arduino has some great library files for I2C.  The basic one I used was “Wire.h”.  Basically, for any I2C communication, you have to start with a Wire.begin(), and then a Wire.beginTransmission([address of peripheral you want to talk to]);.  In our case, the screen requires a 0×48 address.  After that, you’re good to write whatever you want to the screen with a Wire.write().

Essentially, from looking at the documentation for the Arduino and the LCD screen itself, anything that is sent from the micro-controller to the screen will be printed to the screen, unless it encounters a 28 (or in hex, 0x1B, which is what I used in my code).  This special character is called “an escape character”, and allows you do fancy things, such as turn on a cursor, the backlight, or reset the screen.  After the escape character you need a “[” character and then you can do all sorts of fancy things given by the table found in the datasheet for the screen:

As you can see from my code below, I used a couple of these special instructions (to clear the screen when you first turn on the Arduino, and a cursor just for kicks and giggles):

Ben Schoeler - 6/4/2012

Writing to a screen using I2C

This example shows how to write to a screen given an address
And other important instructions per the datasheet.
#include "Wire.h" //gives us handy I2C functions
#define lcd_address 0x48 //found in the datasheet

void setup()
Wire.begin(); //required to begin talking
Wire.beginTransmission(lcd_address); //required to know what to talk to

Wire.write(0x1B); //escape instruction
Wire.write("[j"); //instruction to clear the screen
Wire.write(0x1B); //escape instruction
Wire.write("[0h");//insruction to wrap line at 16 characters
Wire.write(0x1B); //escape instruction
Wire.write("[2c");//instruction to turn the cursor on and blink

//what we actually want to write to the screen
Wire.write("This is a test of I2C protocol");

Wire.endTransmission(); //required to stop the talking

void loop()
//this is empty because I don't want to repeat anything

Ultimately I want to use this screen as a user interface for a keylocking mechanism. More on that later.

Posted in LCD

Brainstorming Ideas

Today I’ve been exploring possible projects I want to make with Arduino.

I think making a cell phone jammer would be a really cool project to work on, but there seems to be nothing on the net about it for Arduino.  However, I found a very documented cell jammer but it uses only hardware: The Wave Bubble.

Another idea I think that would be simpler to start out with would be a door-lock with a keypad.  I did something with a keypad for school, but that was on PIC architecture and in pure C code.  I would have to do some work to get it to work on Arduino.


2 LED’s with Arduino

So for my first project with Arduino, I made 2 LED’s fade and get brighter in a loop.  Basically when one LED is at its brightest the other should be off, and vice versa.

It wasn’t too hard, and the example code provided with the compiler helped me to get started.

Ben Schoeler - 6/1/2012

Fade with 2 LED's

This example shows how to fade LED's on pins 9 and 10

The brightness of each LED will be opposite of the other LED

int yellow_led = 9;
int red_led = 10; // the pin that the LED is attached to
int yellow_brightness = 0; // how bright the LED is
int fadeAmount = 5; // how fast to change the LED's brightness
int red_brightness = 0;

// the setup routine runs once when you press reset:
void setup() {
// declare pin 9 and pin 10 to be outputs:
pinMode(yellow_led, OUTPUT);
pinMode(red_led, OUTPUT);

// the loop routine runs over and over again forever:
void loop() {
// set the brightness of pin 9 (yellow):
analogWrite(yellow_led, yellow_brightness);

// set the brightness of pin 10 (red):
analogWrite(red_led, red_brightness);

// change the brightness for next time through the loop:
yellow_brightness = yellow_brightness + fadeAmount;

// reverse the direction of the fading at the ends of fade:
if (yellow_brightness == 0 || yellow_brightness == 255) {
fadeAmount = -fadeAmount;

//set red brightness to be the opposite of yellow brightness
red_brightness = 255 - yellow_brightness;

// wait for 30 milliseconds to see the dimming effect

I hope to do one of these Arduino projects every day.  I think tomorrow I’m going to set out working on an I2C interface with an LCD screen I have.

Sneak peak: