Arduino workshop at Local Motors

A couple of weeks ago I attended a workshop on Arduino at Local Motors (LM). There were about 20 people, some with experience; others with none. Some brought their own Arduino kits and LM provided kits for us who did not have. First, there was a presentation on Arduino so that we could understand the basics. Then we started the workshop; our first exercise was to blink a LED. In Arduino terms, you enable one pin as output, then you loop to set the value to 0 and 1. Here’s the code:

// Pin 13 has a LED connected on most Arduino boards.
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

I installed the Arduino IDE (version 1.6.4) on my laptop (14.04) sudo apt-get install arduino arduino-core so I could interface with the board which just connects to a USB port. LM provided breadboards so we could try various schematics, blink 2 LEDs with variable timing, control motors, etc. The LM people were very helpful. I plan to go to the next workshop, it was fun.

_____
http://www.arduino.cc/
https://localmotors.com/explore/search/arduino/

Flash your BIOS

Recently, I had to flash my laptop BIOS. It had a very old version, A13 and the latest version is A34. But my laptop is running ubuntu 14.04 and the dell site provides a windows exe, E6400A34.EXE. So, this is what I did:

1. I used a small usb drive I have, formatted it fat32
2. went to the DELL site, found the latest bios for my E6400 laptop and saved that file to the usb drive.
3. I d/l the sysresccd iso (about 435MB) from sysresccd.org and burnt it to a CD.

I put the CD in my laptop, and reboot. Assuming the boot sequence is correct, it should boot off the CD and give you the sysresccd menu. There is an option on floppy images, select that, and then select freedos. Before you click enter, plug in the usb drive with the bios file to your laptop.

After freedos loads, the prompt will be A:\ Type C:\ then dir and that should list the contents of the usbdrive (one file, E6400A34.EXE) Execute that file and the process will start to update the bios. It will take time, it verifies the image and other things, so be patient. After the process completes, reboot and your bios version is A34 now.

There are many ways to do this, which you can find on the web, e.g. instead of the sysresccd you can use a floppy disk image containing DOS (from fdos.org). You can also bypass the whole freedos thing and do the flash with just Linux.

But that’s for a future article …

REMOVE OLD KERNELS

I tend to be on #ubuntu to help others. Today, an interesting question
popped up, how do I clean the old linux images and headers?

Each linux image / header has its own dir in /usr/src/

Let’s start, uname -a … do NOT remove this image

Let’s do a sudo apt-get update … make sure it is clean

If, for some reason, you get errors, try sudo apt-get -f install (fix broken)

Let’s get a list of all the images, dpkg -l | grep linux-image

for each image, issue
sudo apt-get purge linux-image-4.4.0-51 (your numbers will be different)
sudo apt-get purge linux-image-extra-4.4.0-51 (your numbers will be different)

It will do a bunch of things and that image/headers is removed.

After all is done, do another sudo apt-get update to sync everything.

Happy trails!