Saturday, 7 May 2016

K.I.S.S. Pi Sprinkler – Just Keep the Plants Alive

A good first step in a project is knowing what you want to do. [Ben Fino] made it clear that his Raspberry Pi Sprinkler control system for his wife’s garden had one goal: keep the plants alive. The resulting project is doing just that and no more.

The circuitry, and plumbing, is straightforward and explained well in the Instructable. All the electronics consists of is the Pi and a MOSFET to take the 3.3v GPIO to 5v to control a relay. The valve controlling the water requires 28v AC which necessitated the relay to control it. There are also three LEDs: one is for power, one to indicate when the valve is opened, and one is an extra for some future purpose.

FC9RPDAIN4P8QU2.LARGE FIAWKVIIN4P8PZN.LARGE

The intriguing part is the use of weather data from the web to determine if it’s rained recently. Python scripts provided by [Ben’s] friend [Mark Veillette] use a weather site API to get the rainfall data. The main script is set to run once every 24 hours. [Ben] set his system to water unless the previous day had sufficient rain. How much rain and the number of look-back days is programmable.

What a great application of the KISS principle: keep it simple, stupid – except for that third LED without a purpose.


Filed under: internet hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/1s1G2HI
via Hack a Day

Friday, 6 May 2016

Don’t Take Photos of Your Arduino 101 Either, Its Light Sensitive

Wafer level chips are cheap and very tiny, but as [Kevin Darrah] shows, vulnerable to bright light without the protective plastic casings standard on other chip packages.

We covered a similar phenomenon when the Raspberry Pi 2 came out. A user was taking photos of his Pi to document a project. Whenever his camera flash went off, it would reset the board.

[Kevin] got a new Arduino 101 board into his lab. The board has a processor from Intel, an accelerometer, and Bluetooth Low Energy out of the box while staying within the same relative price bracket as the Atmel versions. He was admiring the board, when he noticed that one of the components glittered under the light. Curious, he pulled open the schematic for the board, and found that it was the chip that switched power between the barrel jack and the USB. Not only that, it was a wafer level package.

So, he got out his camera and a laser. Sure enough, both would cause the power to drop off for as long as the package was exposed to the strong light. The Raspberry Pi foundation later wrote about this phenomenon in more detail. They say it won’t affect normal use, but if you’re going to expose your device to high energy light, simply put it inside a case or cover the chip with tape, Sugru, or a non-conductive paint to shield it.


Filed under: Arduino Hacks

from raspberry pi – Hackaday http://ift.tt/1XbcbYY
via Hack a Day

Thursday, 5 May 2016

Issue 165 is out now

LU&D #165

Issue 165 of Linux User And Developer is now available from all good newsagents, our online store, or as a digital magazine. Not in your local store yet? Subscribe to make sure you get it before they do!

In this issue we take an in-depth look at the latest version of Ubuntu, complete with insights from the developers on its new features and how it can converge across your devices – it even comes complete with the 32-bit, 64-bit and Server editions to live boot from the free disc.

We also take our first look at the BBC micro:bit, get started with programming in Go, and look at some useful techniques for virtualisation, data recovery and more. Plus there’s a wealth of Raspberry Pi content to inspire you and help you build and code your own projects.

 



from Linux User & Developer – the Linux and FOSS mag for a GNU generation http://ift.tt/24ty8YO
via IFTTT

Wednesday, 4 May 2016

An Open Source Lead Tester

If you’ve ever needed an example of colossal failure of government actors, you need only to look at Flint, Michigan’s water crisis. After the city of Flint changed water supplies from Detroit to the Flint river, city officials failed to add the correct corrosion inhibitors. This meant that lead dissolved into the water, thousands of children were exposed to lead in drinking water, a government coverup ensued, [Erin Brockovich] showed up, the foreman of the Flint water plant was found dead, and the City Hall office containing the water records was broken into.

Perhaps inspired by Flint, [Matthew] is working on an Open Source Lead Tester for his entry into the 2016 Hackaday Prize.

[Matthew]’s lead tester doesn’t test the water directly. Instead, it uses a photodiode and RGB LED to look at the color of a lead test strip. These results are recorded, and with a bit of a software backend, an entire city can be mapped for lead contamination in a few days with just a few of these devices.

One problem [Matthew] has run into is the fact the Pi does not have analog to digital conversion, making reading a photodiode a little harder than just plugging a single part into a pin header and watching an analog value rise and fall. That really shouldn’t be a problem – ADCs are cheap, especially if you only need a single channel of analog input with low resolution. [Matthew] is also looking into using the Pi webcam for measuring the lead test strip. There are a lot of decisions to make, but any functional device that comes out of this project will be very useful in normal, functioning governments. And hopefully in Flint, Michigan too.

The HackadayPrize2016 is Sponsored by:

Filed under: Raspberry Pi, The Hackaday Prize

from raspberry pi – Hackaday http://ift.tt/1Y7bb6t
via Hack a Day

Friday, 29 April 2016

Connect All Your IoT Through Your Pi 3

If you’re playing Hackaday Buzzword Bingo, today is your lucky day! Because not only does this article contain “Pi 3” and “IoT”, but we’re just about to type “ESP8266” and “home automation”. Check to see if you haven’t filled a row or something…

Seriously, though. If you’re running a home device network, and like us you’re running it totally insecurely, you might want to firewall that stuff off from the greater Interwebs at least, and probably any computers that you care about as well. The simplest way to do so is to keep your devices on their own WiFi network. That shiny Pi 3 you just bought has WiFi, and doesn’t use so much power that you’d mind leaving it on all the time.

Even if you’re not a Linux networking guru, [Phil Martin]’s tutorial on setting up the Raspberry Pi 3 as a WiFi access point should make it easy for you to use your Pi 3 as the hub of your IoT system’s WiFi. He even shows you how to configure it to forward your IoT network’s packets out to the real world over wired Ethernet, but if you can also use the Pi 3 as your central server, this may not even be necessary. Most of the IoT services that you’d want are available for the Pi.

Those who do want to open up to the world, you can easily set up a very strict firewall on the Pi that won’t interfere with your home’s normal WiFi. Here’s a quick guide to setting up iptables on the Pi, but using even friendlier software like Shorewall should also get the job done.

Still haven’t filled up your bingo card yet? “Arduino!”


Filed under: Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/1WWvIwb
via Hack a Day

Saturday, 23 April 2016

Install MySQL Server on your Raspberry Pi

I’m writing this article following a number of requests, and a bit of a follow-up to a previous tutorial “Turn your Raspberry Pi 3 into a PHP 7 powered web server“. This tutorial will guide you through steps to install MySQL Server on your Raspberry Pi.

A bit of a word of warning

As mentioned in my replies to a few comments, I don’t recommend running MySQL Server on a Raspberry Pi unless you have a high-quality, high-speed USB flash drive (preferably) or a UHS1/UHS3 class MicroSd card from which you run Raspbian OS. You might want to look at a previous tutorial to learn how to run your Raspberry Pi from a USB Flash drive.

Step 1 – Install MySQL Server

The first thing to do before anything is to ensure that all updates and upgrades are installed. Run the following command:

sudo apt-get update && sudo apt-get upgrade

Once all the updates are installed, we’re ready to install MySQL server. Start by running the following command:

sudo apt-get install mysql-server && sudo apt-get install mysql-client

This will install the client as well as the server. The client will allow you to connect to your server from the command line which is always handy to do. After a short while, you will see this screen during the installation:

Install MySQL Server on your Raspberry Pi

Go ahead and provide a root password. The root account is the default administration account that allows full control of the locally installed server. You’ll be prompted to repeat this to confirm. Go ahead and type your password again. The installation will finish shortly after.

Step 2 – Connecting to your MySQL server locally

Now we’ve installed MySQL server, we will try connecting to it using the MySQL client we installed at the same time as the server. Type the following command:

mysql -uroot -p

You’ll be prompted for your password again to connect to your MySQL server installation. Congratulations, you’re logged in. You should see something like this:

Install MySQL on Raspbian

Type this command:

status;

This will give you a summary. It should look a little like this:

MySQL on Raspbian OS

This gives us a summary of MySQL Server running on your Raspberry Pi.

Conclusion

We’ve installed MySQL Server and if you’ve followed my previous tutorial to install Apache and PHP 7, you’re ready to start serving a PHP application like WordPress.

I’ll follow-up with another tutorial on installing WordPress in due time.

 

The post Install MySQL Server on your Raspberry Pi appeared first on Ste Wright the Web Developer.



from Tutorials – Ste Wright the Web Developer http://ift.tt/1U9gPG7
via http://ift.tt/1U9gPG7

Amazon

Donate

Donate Towards More Raspberry PI's for Projects