Posts

Showing posts from December, 2016

Legacy computer home automation server

Image
Using legacy systems to do home automation when an Arduino or Raspberry Pi may not be available. They can work just as well.  Server is a Pentium III with Ubuntu and Apache2. Enabled CGI (common gateway interface). Wrote all my own scripts using html, bash, and compiled freebasic (controls the leds).    Leds are connected to the parallel port via a home made adapter cable. Most of the code and interfaces are described in previous articles.  Added the video to the home web page: Time to control real world object such as a coffeemaker. For more information: http://www.tldp.org/HOWTO/text/Coffee

Chromecast ethernet.

Image
You can use ethernet with the Chromecast (1), you just need a usb ethernet adapter and then a otg y host adapter (system must be up to date). Then it should be plug and play if you have the right ethernet adapter. Tried my ethernet adapter and it did not work. Went to Frys who had the right usb to ethernet adapter. All was well till I found that the Home android app on the Nexus 7 did not seem to support ethernet. Though I did not spend anytime seeing whether it could be done. A bummer.

Five volt adapter.

Image
If you have a bunch of old +5v powerblocks with barrel connectors, then you may think they are worthless. Not so you can now get adapters to keep using the old powerblocks with your Raspberry Pi. With the adapter, you can still use the power block as you always have and no soldering required. You could also adapt an old computer power supply. Dangerous!! Wrongly set up it could KILL you Do not do this without expert help. Every power supply is different so you will have to tget the pinout for your power supply to be used. Do not do anything while the splly is plugged in on or off!!!!  Suggestions: User your favorite search engine. AT: ATX: Polarity matters:

Barebone arduino ethernet.

Image
Notice: use at your own risk. If you have an Arduino with a removable chip, then you can use that to program the chip. Otherwise there are circuits to program the standalone Arduino. See "https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard" for more details".   The bare Arduino setup. You need a power source not shone. We used a 4 D size battery setup. Barebones setup before adding ethernet: Wiring:  Downloaded the latest Arduino and Ethercard software. Loaded both of them on the computer. Imported code for a simple web server. // Present a "Will be back soon web page", as stand-in webserver. // 2011-01-30 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php #include <EtherCard.h> #define STATIC 0  // set to 1 to disable DHCP (adjust myip/gwip values below) #if STATIC // ethernet interface ip address static byte myip[] = { 192,168,1,200 }; // gateway ip address static byte gwip[] = { 192...

Documentation is bad sometimes.

Image
Sometimes you just want to tear your hair out when the documentation of a product is WRONG. Something I ran into recently when trying to attach an enc28j60 from Hanrun to my genuine Arduino. I have used the ethernet shield on the Arduino without a hitch. So I supposed there would be no problem again... So I thought. Followed the map for hooking the two devices together as follows: VCC -   3.3V GND -    GND SCK - Pin 13 SO  - Pin 12 SI  - Pin 11 CS  - Pin  8 Downloaded the latest Arduino and Ethercard software. Loaded both of them on the computer. Imported code for a simple web server. // Present a "Will be back soon web page", as stand-in webserver. // 2011-01-30 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php #include <EtherCard.h> #define STATIC 0  // set to 1 to disable DHCP (adjust myip/gwip values below) #if STATIC // ethernet interface ip address static byte myip[] = { 192,168,1,2...

PiFM sorta

Image
Wanted to be able to send music to speakers outside the house say for a barbecue or whatever. Could use Blue tooth among other things, but I wanted something more secure and easier to generally implement. PiFM seemed to be an answer . With a RPi you can send an old fashion radio signal to a radio and the radio will play what is sent it. All you need is an up to date Raspian install on a Raspberry Pi with internet access. I used the original  Raspberry pi for this project. I will probably set one up with the RPi zero. (Note: check you local laws to see if this is allowed.) Also you need to have experience using you RPi remotely. Antenna needs to be at least 7-14 inches long. You need to log into your Rpi command line. All this can be done easily. First thing is to get some software from the software repo for doing software development. Don't worry it will not hurt too bad. Update the system: $ sudo apt-get update $ sudo apt-get upgrade -y $ sudo apt-get dist-update -y...

Arduino conversion.

Image
Using the Arduino development boards can be cumbersome and a bit more expensive. But for simple projects, a standalone Arduino chip just just the right choice. We will convert a typical circuit for a board to a standalone chip setup. int piezoPin = 8; // Declaring Piezo Buzzer on Pin 8 int ldrPin = 0; // Declaring LDR on Analog Pin 0 int ldrValue = 0; // Reading different values from the LDR void setup() { } void loop() { // Starting the cycle functions below ldrValue = analogRead(ldrPin); // read the value from the LDR tone(piezoPin,1000); // Play a 1000Hz tone from the piezo (beep) delay(25); // wait a bit, change the delay for fast response. noTone(piezoPin); // stop the tone after 25 ms in this case delay(ldrValue); // wait the amount of milliseconds in ldrValue } // End of cycle functions      Or   // variable declaration // sensor value int value; // low sensor value calibration int low; // high sensor value calibration...