Pages

Monday, May 27, 2013

OpenSprinkler Pi (OSPi) background Start/Stop/Restart init.d script

I got my OpenSprinkler Pi (OSPi) v1.0   and Raspberry Pi (RPi)  Rev.2  hooked-up and connected to internet via USB WiFi dongle. I wanted  to run OpenSprinkler Pi (OSPi) Interval Program Demo application  in the background automatically  when RPi started. while looking  for a good  init.d script template, found this Simple init.d script template . I did some minor changers and sharing for whoever might be interested:

  1. First You should be creating and saving the file in /etc/init.d
  2. sudo nano /etc/init.d/ospi
  3. After this you will want to make the script executable
  4. sudo chmod 755 /etc/init.d/ospi
  5. You can now go ahead and start your server
  6. sudo /etc/init.d/ospi start
  7. check status of the server
  8. sudo /etc/init.d/ospi status
  9. Test restart the server
  10. sudo /etc/init.d/ospi restart
  11. Test stopping the server
  12. sudo /etc/init.d/ospi stop
  13. And finally register script to be run at start-up
  14. sudo update-rc.d ospi defaults
  15. If you ever want to remove the script from start-up, run the following command:
  16. sudo update-rc.d -f  ospi remove

Saturday, February 23, 2013

My 2013 hardware projects plan

Hello World, 

Finally I am  motivated to do some hardware projects this year and share my experience  through this blog. 
Coming from mostly software background,  I hesitated to deal with solder and resistors etc, but I couldn't find a perfect product unless I make it myself. 

In the past, I played with some Marvell Kirkwood ARMv5 processor based embedded linux platforms  such as  GuruPlug ,  Seagate DockStar, Seagate GoFlex Home plug computers and TrimSlice which is based on ARMv7 NVIDIA Tegra2 SoC.  Basically I upgraded the U-Boot, installed Arch Linux ARM or Android in case of TrimSlice, cross-compiled some libraries such as Mosquitto (open source MQTT   Broker )  , installed Java SE Embedded version, so that I can run OSGi container. Next plan is to run Node.JS or Vert.X on DeckStar for Home Automation Bus project I am working on(will publish a blog on it later). 

Here is how I am using them: 

  • GuruPlug is used as  gateway/router/firewall laying between my broadband modem and network switch running Shorewall Firewall and PBX with sip2sip.info trunk. 
  • Seagate DockStar is used for development work. 
  • Two Seagate GoFlex Home bases to backup my PCs/Mac and automatically and selectively replicate files to hard drive connected to second  GoFlex Home using RSync 
  • TrimSlice, planing to use as media player hooked-up to a TV and running XBMC   

Coming to hardware projects, I have two old TI MSP430 LaunchPads ($5) and recently bought  BeagleBone board. BeagleBone is interesting because it have processing power with ARM processor and pinouts like Arduino to connect to breadboard, sensors and develop standalone  applications.

Projects in my mind for 2013 are:

  • Agriculture Sensor Board:  that is installed outside in the garden, periodically collecting ground moisture levels and ground temperature, air temperature, humidity and solar radiation etc., and wirlessly transmitting data to a data logger. My goal is to collect historically data, analyze and use the results to control  watering schedule. 
  • Wireless Rover /Bot: build a simple rover with a cam that can be remotely controlled  using  iOS app using built-in gyroscope  over the internet. To be used for home surveillance and security. 

Finality I am excited about Pinoccio  project. They are making a fantastic  wireless board that is designed based on Atmel's  ATmega256RFR2, a single-chip MCU and RF solution. It will have energy harvesting capability and support mesh network for wireless communication.