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

Friday 22 April 2016

Modifying a Raspberry Pi 2 To Fit In Small Places

Still can’t get your hands on a Pi Zero? We know. Why not de-solder a few headers from a Raspberry Pi 2 to fit in your next project instead? Using a pair of 2.5″ HDD enclosures, [nodenet] made a mini linux laptop using the Raspberry Pi 2 — It even has a touch screen, and features a 1000mAh battery!

All in all it cost him about $120 for all the components, but before you JrECiM0rush out to make your own, you will need pretty good skills with a soldering iron to successfully downsize your Raspberry Pi 2. The modifications require removing both USB ports, the Ethernet plug, the GPIO pins, the HDMI port, the A/V jack and the camera connectors.

He used a combination of a mini hacksaw, and a soldering iron to remove all the components — what you’re left with his a business card sized computer — but the real fun part is re-attaching all the components with leads.

The build reminds us a bit of this Nintendo DS housed Raspberry Pi clone — another contender for the smallest portable pi.

[Thanks Gerbal via reddit]


Filed under: handhelds hacks, linux hacks, Raspberry Pi

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

USB-less WiFi For The Pi Zero

Since the introduction of the Raspberry Pi Zero, the hacker, maker, and hobbyist electronics world has been thrown into turmoil. ‘The Raspberry Pi Foundation is corrupt,’ the detractors said, ‘and the Pi Zero is just a marketing ploy to get their name out.’ Others chimed in that the Raspberry Pi Zero doesn’t even exist. Despite what a million monkeys on a million keyboards say, the Raspberry Pi Zero does exist and is very cool, despite how limited it is. There’s only one USB port, but that doesn’t mean you can’t have WiFi. [ajlitt] came up with a WiFi hat for the Pi Zero that goes right through the GPIO pins, and shouldn’t cost more than a few dollars to implement on any Raspberry Pi.

There is no Ethernet port on the Pi, and apart from a single USB OTG port, no apparent high-speed interfaces to the outside world. On the other hand, there’s a few things hidden deep down in the SoC on the Pi including two MMC controllers. One of these controllers is used for the SD card, but the second can be broken out on a few GPIO pins. By tapping into those pins and configuring the kernel just right, SDIO is available on the GPIO pins, giving the Pi WiFi through a cheap ESP8266 module.

We’ve seen [ajlitt]’s work on SDIO devices on the Pi before, but he’s slowly been reworking this build with the Pi Zero in mind. It didn’t begin as a project for the Hackaday Prize, but already it’s one of the more popular entries so far. Of course there are thousands of projects on Hackaday.io that aren’t entered into the Hackaday Prize this year, and if you’re behind one of those, this is your call to step up.

The HackadayPrize2016 is Sponsored by:

Filed under: Raspberry Pi, The Hackaday Prize

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

Sunday 17 April 2016

Save a Spaceship with Spacehack!

York Hackspace needed a demonstration piece to grace their stand at Maker Faires and similar events. Their solution was Spacehack, a multi-player control console based starship emergency simulator game. Each Spacehack player has console with a selection of displays, switches, dials, and levers. Players must operate their controls in response to a series of sometimes confusing commands the game supplies them from their fellow crew members. Each wrong move brings the disaster-prone ship closer to destruction, and the aim is to keep it spaceworthy for as long as possible. The result is an engaging and addictive draw for the hackspace.

Behind the brilliantly designed consoles, silver ducting and pyramidal hub box the game relies on a Raspberry Pi acting as a server and a Beaglebone Black for each player. All resources can be found on York Hackspace’s GitHub repository. The hackspace has a selection of videos on the Spacehack website, the one below the break shows the game as well as a montage of its construction.

As you might expect, we’ve covered a lot of games over the years here on Hackaday. But browsing the archives something becomes obvious, while almost every conceivable take on a video game has been tried by our incredibly creative community there are very few that escape that box. A ball throwing game perhaps, or even a one-pixel game. It’s not often that someone produces a game like Spacehack, but when they do it’s definitely worth a second look.


Filed under: Hackerspaces

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

Digital Logging Of Analog Instruments

The only useful data you’ll ever find is already digitized, but a surprising number of gauges and meters are still analog. The correct solution to digitizing various pressure gauges, electric meters, and any other analog gauge is obviously to replace the offending dial with a digital sensor and display. This isn’t always possible, so for [Egar] and [ivodopiviz]’s Hackaday Prize entry, they’re coming up with a way to convert these old analog gauges to digital using a Raspberry Pi and a bit of computer vision.

The idea behind this instrument digitizer isn’t to replace the mechanics and electronics, as we are so often wont to do. Instead, this team is using a 3D printed bracket that mounts a Raspberry Pi and camera directly in front of an analog gauge. Combine this contraption with OpenCV, and you have a device that’s just smart enough to look at a needle on a dial, convert that to a number, and save it to a file or send it out over WiFi.

It’s an extremely simple device for what [Egar] and [ivodopiviz] admit is a relatively niche application. However, if you only need digital measurements of an analog meter for a month or so, or you don’t want to mess up your steampunk decor, it’s an ingenious build.

The HackadayPrize2016 is Sponsored by:

Filed under: Raspberry Pi, The Hackaday Prize

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

Friday 15 April 2016

Weight Tracking, Wise Cracking IoT Bathroom Scale

For those fighting the battle of the bulge, the forced discipline of fitness bands and activity tracking software might not be enough motivation. Some who are slimming down need a little gentle encouragement to help you lose weight and keep it off. If that sounds like you, then by all means avoid building this weight-tracking IoT scale with an attitude.

Then again, if you live in fear of your scale, [Jamie Bailey]’s version is easy to hate, at least when your numbers are going in the wrong direction. Centered around a second-hand Wii Balance Board talking to a Raspberry Pi via Bluetooth, the scale really only captures your weight and sends it up to InitialState for tracking and feedback. Whether the feedback is in the form of jokes at your expense is, of course, is entirely up to you; if you’d rather get gentle nudges and daily affirmations, just edit a few files. Or if your tastes run more toward “Yo momma so fat” jokes, have at it.

Bathroom scales are a good hacking target, whether it’s reverse engineering a digital scale or eavesdropping on a smart scale. This build is snarky good fun, and if nothing else, it’s good for pranking your roommate. Unless your roommate is your husband or wife, of course. That’s just – no.


Filed under: Medical hacks

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

A Star Tracking Telescope Mount

[Chris] recently got his hands on an old telescope. While this small refractor with an altitude-azimuth mount is sufficient for taking a gander at big objects in our solar system, high-end telescopes can be so much cooler. Large reflecting telescopes can track the night sky for hours, and usually come with a computer interface and a GOTO button. Combine this with Stellarium, the open source sky map, and you can have an entire observatory in your back yard.

For [Chris]’ entry into the 2016 Hackaday Prize, he’s giving his old telescope an upgrade. With a Raspberry Pi, a few 3D printed adapters, and a new telescope mount to create a homebrew telescope computer.

The alt-az mount really isn’t the right tool for the astronomical job. The earth spins on a tilted axis, and if you want to hold things in the night sky still, it has to turn in two axes. An equatorial mount is much more compatible with the celestial sphere. Right now, [Chris] is looking into a German equatorial mount, a telescope that is able to track an individual star through the night sky using only a clock drive motor.

To give this telescope a brain, he’ll be using a Raspberry Pi, GPS, magnetometer, and ostensibly a real-time clock to make sure the build knows where the stars are. After that, it’s a simple matter of pointing the telescope via computer and using a Raspberry Pi camera to peer into the heavens with a very, very small image sensor.

While anyone with three or four hundred dollars could simply buy a telescope with similar features, that’s really not the point for [Chris], or for amateur astronomy. There is a long, long history of amateur astronomers building their own mirrors, lenses, and mounts. [Chris] is just continuing this very long tradition, and in the process building a great entry for the 2016 Hackaday Prize

The HackadayPrize2016 is Sponsored by:

Filed under: Raspberry Pi, The Hackaday Prize

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

Thursday 14 April 2016

CarontePass: Open Access Control For Your Hackerspace

A problem faced by all collaborative working spaces as they grow is that of access control. How can you give your membership secure access to the space without the cost and inconvenience of having a keyholder on site at all times.

[Torehc] is working on solving this problem with his CarontePass RFID access system, at the Kreitek Makerspace (Spanish, Google Translate link) in Tenerife, Canary Islands.

Each door has a client with RFID readers, either a Raspberry Pi or an ESP8266, which  connects via WiFi to a Raspberry Pi 2 server running a Django-based REST API. This server has access to a database of paid-up members and their RFID keys, so can issue the command to the client to unlock the door. The system also supports the Telegram messaging service, and so can be queried as to whether the space is open and how many members are in at a particular time.

All the project’s resources are available on its GitHub repository, and there is a project blog (Spanish, Google Translate link) with more details.

This is a project that is still in active development, and [Torehc] admits that its security needs more work so is busy implementing HTTPS and better access security. As far as we can see through the fog of machine translation at the moment it relies on the security of its own encrypted WiFi network, so we’d be inclined to agree with him.

This isn’t the first hackerspace access system we’ve featured here. The MakerBarn in Texas has one using the Particle Photon, while the Lansing Makers Network in Michigan have an ingenious mechanism for their door, and the Nesit hackerspace in Connecticut has a very fancy system with video feedback. How does your space solve this problem?

The HackadayPrize2016 is Sponsored by:

Filed under: Hackerspaces, security hacks, The Hackaday Prize, wireless hacks

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

Tuesday 12 April 2016

Arduino Comes To The Raspberry Pi, Linux ARM Devices

Arduino is the perfect introduction to microcontrollers and electronics. The recent trend of powerful, cheap, ARM-based single board Linux computers is the perfect introduction to computer science, programming, and general Linux wizardry. Until now, though, Arduino and these tiny ARM computers have been in two different worlds. Now, finally, there are nightly builds of Arduino IDE on the Raspberry Pi and other single board Linux computers.

The latest Arduino build for ARM Linux popped up on the arduino.cc downloads page early this week. This is the result of an incredible amount of work from dozens of open source developers across the Arduino project. Now, with just a simple download and typing ‘install’ into a terminal, the Arduino IDE is available on just about every single board Linux computer without having to build the IDE from source. Of course, Arduino has been available on the Raspberry Pi for a very long time with sudo apt-get install arduino, but this was an older version that cannot work with newer Arduino boards.

Is this distribution of the Arduino IDE the same you would find on OS X and Windows? Yep, everything is the same:

Arduino Editor Arduino Boards Arduino Example

While this is really just arduino.cc improving their automated build process and putting a link up on their downloads page, it does make it exceptionally easy for anyone to set up a high school electronics lab exceptionally easy. The Raspberry Pi is almost a disposable computing device, and combining it with Arduino makes for a great portable electronics lab.


Filed under: Arduino Hacks, linux hacks, Raspberry Pi

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

Friday 8 April 2016

Build Your Own GSM Base Station For Fun And Profit

Over the last few years, news that police, military, and intelligence organizations use portable cellular phone surveillance devices – colloquially known as the ‘Stingray’ – has gotten out, despite their best efforts to keep a lid on the practice. There are legitimate privacy and legal concerns, but there’s also some fun tech in mobile cell-phone stations.

Off-the-shelf Stingray devices cost somewhere between $16,000 and $125,000, far too rich for a poor hacker’s pocketbook. Of course, what the government can do for $100,000, anyone else can do for five hundred. Here’s how you build your own Stingray using off the shelf hardware.

[Simone] has been playing around with a brand new BladeRF x40, a USB 3.0 software defined radio that operates in full duplex. It costs $420. This, combined with two rubber duck antennas, a Raspberry Pi 3, and a USB power bank is all the hardware you need. Software is a little trickier, but [Simone] has all the instructions.

Of course, if you want to look at the less legitimate applications of this hardware, [Simone]’s build is only good at receiving/tapping/intercepting unencrypted GSM signals. It’s great if you want to set up a few base stations at Burning Man and hand out SIM cards like ecstasy, but GSM has encryption. You won’t be able to decrypt every GSM signal this system can see without a little bit of work.

Luckily, GSM is horribly, horribly broken. At CCCamp in 2007, [Steve Schear] and [David Hulton] started building a rainbow table of the A5 cyphers that is used on a GSM network between the handset and tower. GSM cracking is open source, and there are flaws in GPRS, the method GSM networks use to relay data transmissions to handsets. In case you haven’t noticed, GSM is completely broken.

Thanks [Justin] for the tip.


Filed under: Cellphone Hacks, radio hacks

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

Wednesday 6 April 2016

Why Buy Your Children a Game Console When You Can Build Them One?

[buildxyz] had no opposition to his kids playing video games, but wanted something that offered a bit more parental control, a larger game selection, and was maybe a little more contained than a modern game console.

So, in his multi-part build log, he goes through all the steps of making a Raspberry Pi into a kid friendly wall-mounted game console. The frame is made from Baltic Birch plywood, and the edges look cool when stained. The display is an old HP monitor, and the speakers are simple beige bricks from the thrift store. The controllers hook into a USB hub on the front. It’s not a complicated build, but it’s very well done.

The coolest feature, from the parent’s point of view, is the combination lock on the front. A rotary encoder surrounded by NeoPixels provides the input and feedback. Depending on the code [buildxyz] inputs his children can receive different periods of dopamine hits, and if he enters a special code for occasions like birthdays, unlimited play time becomes available.

We hope he’s prepared to have the only four year olds who can crack safes on the block. The build looks awesome, and there’s not really a commercial product out there to match it. Watch the video.


Filed under: nintendo hacks, Raspberry Pi

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

Tuesday 5 April 2016

Hand Gestures Drive Car

There are a number of ways to control an automobile without using the pedals, and sometimes even without using the steering wheel. Most commonly these alternative control mechanisms are installed in vehicles whose owners are disabled in some way, but [Anurag] has taken this idea of alternative control one step further. He has built a car that can be driven by hand gestures alone.

On a remote controlled car, a Raspberry Pi 2 was installed that handles processing and communication. A wireless network is created on the Pi, and a laptop connects to the Pi over the network. The web camera on the laptop regularly captures frames at 15 fps to check for the driver’s hand gestures. The image is converted to gray scale, thresholded, contours are obtained, and the centroid and farthest points are obtained.

After some calculations are done, a movement decision is taken. The decision is passed to the Pi, which in turn, passed that to the internal chip of the car. All of the code is available on the project’s github page. [Anurag] hopes that this can be scaled up to full sized cars in the future. We’ve seen gesture-based remote controls before that rely on Sonar sensors, so it’s interesting to see one that relies strictly on image processing.


Filed under: car hacks, peripherals hacks, video hacks

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

Make Your Mailman Nervous With a Wifi Enabled Mailbox

“It’s not a bomb,” the mailman whispered to himself as he reached for [atxguitarist]’s mailbox, giving a nervous glance at the small black box stuck to the side. “This is THAT house, it’s not a bomb. I’m sure it’s not a bomb,” he muttered as a cold bead of sweat ran down his neck. His hand approached slowly, shakily. The mailman gathered courage, then, in a single quick movement, opened the box. He sighed relief as nothing happened. Somewhere in [atxguitarist]’s house a recording wailed “You’ve got mail!”

The mailbox enhancement in question is a hacked Amazon Dash Button in a project box. When the door of the mailbox is opened, a magnetic reed switch simulates a button press on the Dash. The Dash transmodulates the signal into WiFi pixies which are received by a Raspberry Pi. The Pi’s sole purpose in life is to run a 24-line Python script that plays the famous sound from AOL’s mail software and sends a notification to his phone.

Aside from unnerving the mailman, it’s a cool hack and keeps you from slugging it out there in the cold or rain to witness an empty box.

[via r/DIY]


Filed under: Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/23cKdgR
via Hack a Day

Sunday 3 April 2016

DVB-S From a Raspberry Pi with No Extra Hardware

An exciting aspect of the trend in single board computers towards ever faster processors has been the clever use of their digital I/O with DSP software to synthesize complex signals in the analogue and RF domains that would previously have required specialist hardware. When we use a Raspberry Pi to poll a sensor or flash an LED it’s easy to forget just how much raw processing power we have at our fingertips.

One of the more recent seemingly impossible feats of signal synthesis on a Raspberry Pi comes from [Evariste Courjaud, F5OEO]. He’s created a DVB-S digital TV transmitter that produces a usable output direct from a GPIO pin, with none of the external modulators that were a feature of previous efforts required. (It is worth pointing out though that for legal transmission a filter would be necessary.)

DVB is a collection of digital TV standards used in most of the world except China and the Americas. DVB-S is the satellite version of DVB, and differs from its terrestrial counterpart in the modulation scheme it employs. [Evariste] is using it because it has found favor as a digital mode in amateur radio.

This isn’t the first piece of [F5OEO] software creating useful radio modes from a GPIO pin. He’s also generated SSB, AM, and SSTV from his Pi, something which a lot of us in the amateur radio community have found very useful indeed.

We’ve covered digital TV creation quite a few times in the past on these pages, from the first achievement using a PC VGA card almost a decade ago to more recent Raspberry Pi transmitters using a USB dongle and a home-built modulator on the GPIO pins. Clever signal trickery from digital I/O doesn’t stop there though, we recently featured an astoundingly clever wired Ethernet hack on an ESP8266, and we’ve seen several VHF NTSC transmitters on platforms ranging from the ESP to even an ATtiny85.

Thanks [SopaXorzTaker] for the nudge to finally feature this one.


Filed under: radio hacks, Raspberry Pi

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

Amazon

Donate

Donate Towards More Raspberry PI's for Projects