Plane Crash in Carlstadt NJ

I was witness to the aftermath of a horrific plane crash today near my office. A small Lear Jet 35 crashed into the buildings at the end of our block. Links below to my on scene photos and video.

Thankfully the only known injured/killed were the aircraft crew of two.

National news picked it up, just Google for “carlstadt plane crash” for stories. Some of my footage was used by ABC and a few other stations.

Photos on Flickr
Video on YouTube
More after the jump. Continue reading “Plane Crash in Carlstadt NJ”

Multimedia Library Server

I’ve always used iTunes to manage my sharing and remote playing of my media library within my home.

As you no doubt know, iTunes sucks at sharing/streaming media. I used iTunes because it was the path of least resistance despite all the verbal abuse I’ve hurled at it…it’s bloated, slow, crashes etc…but that’s a whole different article…. 😉

Enter Plex. My Padawan at work turned me on to the Plex Media Server and my media consumption has been upgraded beyond my wildest imagination.

Continue reading “Multimedia Library Server”

Jeff’s Raspberry Pi Setup Notes

Raspberry Pi Setup Notes

These are the notes I keep for initial setups of the base Raspberry Pi Linux images.  They were collected from all over the internet and from personal experiences. If you find errors let me know. I’m always updating it so check back if you’re looking to add a feature that you can’t find
anywhere else.

Everything here relies on what exists on the internet already. Nothing here is original except that it’s all in one place.

LAMP Setup

sudo apt-get install apache2

OR

sudo apt-get install nginx

 

sudo apt-get install mysql-server

sudo apt-get install php5 php5-mysql

Further  LAMP features

sudo apt-get install php5-fpm php5-cgi php5-cli php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-xcache

More Stuff

sudo apt-get install chkconfig snmp net-snmp* imagemagick htop webalizer

 

sudo pear channel-update pear.php.net sudo pear install MDB2

sudo pear install pear/MDB2_Driver_mysql

Webmin

To install Webmin open a terminal and add the following repository:

1- Edit /etc/apt/sources.list file

sudo nano /etc/apt/sources.list

2- Add the following lines

deb http://download.webmin.com/download/repository sarge contrib

deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Save and exit the file

3- Now you need to import GPG key

wget http://www.webmin.com/jcameron-key.asc

sudo apt-key add jcameron-key.asc

4- Update the source list

sudo apt-get update

5- Now install Webmin

sudo apt-get install webmin

Now to access Webmin open your browser and enter:  http://serverip:10000/

You can get your ip address by issuing this command:

ifconfig

 

Remove any unneeded packages

There will eventually be packages that are unneeded. Apt-get can get rid of them by issuing this command:

 

sudo apt-get autoremove

Remote Desktop

Installing this allows you to connect via RDP on Windows.

sudo apt-get install xrdp

Add Chrome/Chromium to Desktop

Adds “Chrome” web browser to the GUI interface.

sudo apt-get install chromium-browser

Check CPU Clock Speed

This will show the current CPU clock speed in hertz

 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Raspi-config

This is the initial configuration utility. I always forget its name..

sudo raspi-config

Just no time!

I hope to get to play with my arduino projects over the next week when I’m off for the holidays.

The first hardware version of Lizard Climate Control project is still faithfully running with no glitches. The only adjustments I ever make are to the RTC which can’t keep time to save its life.

The next LCC hardware version will include a more accurate, temperature compensated RTC so I shouldn’t have to mess with it. However when I last played with the code for it I ran out of RAM and program storage space on Arduino. Thus I will most likely be using an Arduino Mega for the next version.

Happy Holidays!

Microcontrollers, Embedded Systems and Single Board Computers

Many different terms are used for the devices that run our small computing projects. In addition there are lots of different hardware/software platforms. Many are pin compatible, similar in size and function and can achieve the same result in different ways.

Here are some of the common terms:

Microcontroller
A microcontroller is a small computer built into a single chip. This chip contains the processor, RAM, EPROM and I/O pins. These generally are designed for executing I/O and small computational functions.

The Arduino is not just a microcontroller. It’s a platform that includes a microcontroller. Usually an ATMega chip. An Arduino also includes other chips and components to make it easy to communicate with, program and prototype with.

Embedded Systems
Embedded systems are also small computers all on one chip (also called SoC for System On a Chip). These are generally more powerful (32 bit as opposed to 8 or 16 bit CPUs on microcontrollers) than a microcontroller and can run full operating systems like Linux or Windows. They too have other chips for communication and I/O and offer programming in higher level languages supported by the operating system. The Raspberry Pi is considered an embedded system but also falls under the next classification. Embedded Systems are also found in many consumer electronics like MP3 players and cell phones. In these cases they aren’t for prototyping or user programming but their features are very similar. iPhone and Android phones/tablets also use SoCs extensively.

Single Board Computer
A single board computer is an Embedded System with ALL the bells and whistles on a small board. This usually includes USB, Ethernet, Video, GPIO, Storage and possibly expandable memory. The Raspberry Pi is definitely a single board computer. It also has prototyping components like most microcontroller platforms. It’s a powerful fully featured system.

 

A Cutting Confession

I’ve been distracted from my Arduino projects lately. Here’s what’s going on:

It’s true. I’m a cutter. I admit it. I cut vinyl. Lots of it.

My wife and I have started a tiny business selling vinyl stickers.

It’s a great combination of her creativity, my technical skills and our love of sharing that with the world.

Sure, it’s been done. There’s LOTS of competition. We think that we can compete since our costs are really low and we can create literally anything.

Our main website is www.jnmvinylstudio.com

 You can find our work on:

Etsy: http://www.etsy.com/shop/JnMVinylStudio?ref=search_shop_redirect

 Or

eBay: http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=helicopterjeff

 Our pricing varies a bit depending on the venue.

If you have any questions or have something you’d like made please just ask!  What we have published are fairly common designs and it grows weekly.

PID? What is it?

Wikipedia says that a proportional–integral–derivative controller (PID controller) is a generic control loop feedback mechanism (controller) widely used in industrial control systems – a PID is the most commonly used feedback controller. A PID controller calculates an “error” value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process control inputs.

So what?

Continue reading “PID? What is it?”

Decade Counter!

I wanted a way to have a “rotatable” counter to indicate that the LCC was still looping properly.  I finally found something! A decade counter (as noted in an earlier post)!

Now instead of pulsing one led I have a “spinner” type of effect. I don’t have to keep track of where the “count” is….I just pulse it. Coding this would have been a nightmare. Of course wiring 10 LEDs is a mess but it’s a cool one.

decade counter mess
decade counter mess

Lost Memory…

I’ve been programming for most of my life. Very very rarely have I had issues with memory or lack of memory.

Now that I’m hot an heavy into microcontroller programming I’ve stumbled across an issue that has apparently been causing me issues without me know it it.

Lack of memory!

The ATmega328 series chip that is the brain of the typical Arduino board has 3 memory locations.

  • The Flash is typically 32k bytes. This is what the Arduino IDE tells you about when you compile/upload your code.
  • The SRAM is something no one told me about…this is the actual operating program memory space (RAM). This is where your app runs and lives. Your variables live here. When this space is used up things get wonky. The Arduino crashes or worse does strange unexplainable things.
  • The EEPROM is generally not used by the average programmer so I won’t cover it here.

JeeLabs has a killer write up on the SRAM and…wait for it….how to see how much is used!

I added their little function to output RAM usage and holy cow. I had it all used up!

So I had to learn about memory management. Lesson one- strings use up a lot of space!

JeeLabs also has a killer write up on how to optimize your string usage. READ IT! The Arduino site also has a write up on how to use the Flash memory for storing static variables too.

After all this learning I finally got my code “optimized”. I thought my latest project was a gonner but putting variables in Flash, dumping A LOT of debug code made a huge difference. I went from zero bytes of RAM and crashes to about 646 bytes free.  Doesn’t sound like much but when you only have 2048 bytes to start with, that’s pretty good!

Now to figure out how to have my debug code and still keep the memory usage low!

 

The Next Lizard Climate Control…

I’ve started on LCC 2nd Gen or LCC2 or LCC II. I don’t know what to call it. BUT I do know it’ll be killer.

This one is going to be everything LCC 1 was not.

So far I have:

  • Ethernet
  • 64 GPIOs
  • A better RTC
  • 2 OLED displays
  • The RTC can be updated via serial — no need to upload code to the Arduino, update the clock and then reupload the LCC code!
  • More cool factor….

So check this out- I2C rocks! The awesome Centipede Shield from macetech.com is HUGELY awesome. Via the I2C 2 wire interface you now have access to 64 Digital ports. In any combination of In or Out. This is the cornerstone of the new LCC hardware. Especially since the Ethernet takes a lot of digital ports. This thing is way cool. If you need more digital ports get one asap.

The OLED displays are really neat. I got 5 from a Kickstarter project and they’re now generally available from Sabernetics Tech. They’re tiny and bright! Since you now have 64 ports you can have as many of these displays as you want. Just put each on its own port to select which one to write to…If you don’t you’ll write to them all at once! Gotta love bus networks (I2C).

I hope to make the LCC’s ability to control lights and heat sources more generic. Since the IO is so plentiful I can make the code generic enough to handle fans, heat mats, uv lights etc in different combinations.

Keep checking the site as I post updates about this project!