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.
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
Everything here relies on what exists on the internet already. Nothing here is original except that it’s all in one place.
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.
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:
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.
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.
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.
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.
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!
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:
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!