Wednesday, August 3, 2016

Build a DIY Weather Forecast Display With a Raspberry Pi and a LED Matrix_part1

LED Weather Words Forecast

This project utilizes a 22 x 13 matrix of addressable RGB LEDs to visualize a weather forecast pulled from the Weather Underground API.

A Raspberry Pi runs a python program designed to fetch weather forecast data from the API at regular intervals, parse the data into temperature, wind speed, and weather condition arrays, and then light specific sets of LED's that represent words in the LED matrix.

Mounted in its own enclosure, the project can set on a shelf, desk, or hang on a wall as a visual display for upcoming weather conditions over the next 12 hours.

The inspiration for this project comes from the beautiful LED Word Clocks that captured my imagination when they first began showing up on maker community forums. After a lot of research, tinkering, programming, and several failed attempts, I'm happy to have a version with a twist that I can share with the community that inspired me.

Step 1: Materials

Hardware

  • Raspberry Pi with Raspbian installed and configured to connect to the internet (for this project, I prototyped with the 3 and later installed the Zero*)
  • 5 Volt Power Supply, 4 Amps or greater
  • 2.1mm Female Barrel Jack Adapter or MicroB USB Connector (depending on your power supply jack)
  • Micro USB Connector Shell
  • Capacitor - 1000 µF, 6.3V or higher (I used a 1000µF, 16V that I had on hand)
  • Resistor (300 to 500 Ohm)
  • 74AHCT125 Level Converter
  • 5 Meters Addressable 5V RGB LED Strip (60 LEDs per meter) - 286 LED's are used in this project
  • Breadboard, Connecting Wires, and Headers

* Note that if you choose to use the Zero, you will need a USB hub, a Micro USB Male to USB Female Adapter, and a Mini HDMI to Standard HDMI Jack Adapter to interface with the Pi for software setup and troubleshooting.

Software

  • NeoPixel Library for Raspberry Pi - rpi_ws281x library (available here)
  • Program Files - apiboot.txt and weather_word.py (available here)
  • API key from WeatherUnderground (available here)
Other Materials

  • 11" x 14" Shadow Box Frame (or other enclosure to suit)
  • 11" x 17" Copy Paper and Transparency Film (Acetate)*
  • Cardboard
  • Black Garbage Bag
  • Vellum (optional)
  • Hot Melt Glue Gun and Glue (for mounting cardboard to cardboard)
  • Suitable Double Sided Tape (for mounting LED's, Breadboard, and Pi to cardboard)
  • Suitable Glue (for mounting printed templates to cardboard)

* Note that my local copy shop did not carry the needed transparency film. I purchased the film online in a bulk quantity which was an expense that was not anticipated at the start of this project. You might get lucky or be able to negotiate with a shop in your area on carrying this material.

Special Tools

  • You will need to be able to solder for this project. The rows of addressable LED's will need to be soldered together to connect their inputs and outputs. The Raspberry Pi Zero will need to have at least two headers soldered for GPIO connections.
  • Beside basic cutting tools (scissors and hobby knife), a craft/scrapbooking paper trimmer will aid greatly in cutting evenly dimensioned "light baffles" from thin cardboard.
  • Laser printer for printing on the transparency film (I utilized the local copy shop laser printer).

Templates


Step 2: Prepare the Bottom and Top Weather Word Templates




For this project, it will be important to center the bottom and top Weather Word Templates in the enclosure so that when the two are mounted together, the light baffles will lay between the rows and blocks of words.

Measure and record the innermost length and width of the enclosure. Mine measured 11" x 14-1/16". Cut a sturdy piece of cardboard to this dimension and check that it fits snuggly in the enclosure. This piece will serve as the base for mounting the LED's, light baffles, and assembled electronic hardware. Cut another sturdy piece of cardboard that is approximately 14" long and 4" wide. This piece will be cut into light baffle sides at a later step.

Print out two (2) copies of the "Bottom Word Template" on 11" x 17" paper. Be sure to print it at 100% scale (not "scaled to fit"). Measure and trim one of the templates to center it to the cardboard base. Glue this template firmly to the cardboard ensuring that the majority of the paper is adhered (this is important because the LED's and light baffles will be adhered to this base at a later step). Set the second copy of the Bottom Template aside for later reference (it will be useful for measuring and comparing your Top Templates at a later step).

Print out one (1) copy of the "Side Baffle Template" on 11" x 17" paper. Be sure to print it at 100% scale. The lines on this template are meant to align with the word rows on the bottom template and to serve as an aid for obtaining straight and square light baffle rows later in the project. Measure and trim the template to center it to the 14" x 4" piece of cardboard. Glue this template firmly to the cardboard ensuring that the majority of the paper is adhered.

Print out three (3) copies of the "Top Word Template" on 11" x 17" transparency film (acetate) using a laser printer (I utilized the local copy shop for this step). Again, be sure that these are printed at 100% scale. Also check that the top template is roughly centered on the width of the acetate (my enclosure width was exactly the width of my acetate ... maintaining centering at this step helped to ensure I was roughly centered to my bottom template). Before proceeding, compare the printed top templates to the saved copy of the bottom template. The two should be a close match (there will be some difference top to bottom as the acetate shrinks under the heat of the laser printing, but the difference should only be slight). Measure and trim each of the top templates to center them to the enclosure dimensions recorded previously and check that they fit snuggly in the enclosure. Align the words of each copy of the top template together and adhere the copies together using double sided tape.


Step 3: Prepare the LED Rows





The LED matrix consists of (22) rows of addressable RGB LED strips (13 LED's per row). Because the LED strips are purchased in meter plus lengths, each row for this project was cut across the copper terminal pads between the 13th and 14th LED of the purchased strip.

Use double sided tape to adhere each row of LED's to the bottom template. Start with the travel of the data from left to right on the top word row (look for the arrows on your LED strip) and then right to left on the next word row. Alternate the data travel in this fashion down through all 22 rows of the template.

The rows of LED's will be connected in groups of 5 (and then 2 at the end). All of the rows will be connected at the data points (to make a fully addressable block of 286 LED's) but the rows will only be powered in parallel groups of 5.

Before soldering the rows together, you might consider cutting holes or slots through the bottom template at the end of each row to feed the wire through. You can see from the pictures that I looped the wire directly between the rows and later needed to cut slots in the side baffles to accommodate. The baffle slots worked fine and did not cause any excess light bleed outside of the intended area, but they took extra time to cut and fit properly over the wires.

Now solder each row together using short (approximately 2") wire to connect GND-to-GND, DIN-to-DOUT, and VDC-to-VDC in the direction of data travel stopping at the end of the 5th row. Only solder the DIN-to-DOUT between the 5th and 6th row. Solder short wire to the GND and VDC of the 6th row and leave those free to connect power later. Continue in this fashion down all 22 rows of the template.

Step 4: Prepare the Light Baffles



Obtain some thin(ish) cardboard for cutting into light baffle rows (I used cereal boxes). Measure and trim the cardboard into (46) strips that are 8-5/8" long x 1" wide. Use double sided tape to adhere the strips together in pairs to obtain (23) light baffle rows (the baffles seemed flimsy individually and I thought that two together would provide better stability across the rows ... in hindsight this may of have been overkill, but I can't speak for whether a single strip is sufficient).

Cut an extra (5) strips for use as word block baffles at a later step.

Use a hot melt gun and glue to adhere each light baffle row to the line on the bottom template. Be sure to use plenty of glue and work quickly to obtain strong adhesion between the baffle rows and the bottom template. Also be sure to try to keep each baffle row aligned along and end-to-end of the printed bottom template line.

Measure and trim the 14" x 4" piece of cardboard with the adhered side baffle template into two strips that are 13-1/4" long x 1" wide. Fit check the sides to the bottom template. Each line on the side baffle template should align with the word rows on the bottom template. There should also be some overhang of the side baffle at the top and bottommost rows.

Use a hot melt gun and glue to adhere the side baffles along the left and right hand sides of the bottom word template. Again being sure to use plenty of glue and working quickly to obtain strong adhesion between the sides and the bottom template. Now use the hot melt glue to adhere each end of the baffle rows to the baffle sides.

Next, cut and adhere the (47) word block baffles. These baffles will block the light between the lighted weather words. Using the bottom template as a guide, trim individual block baffles and use hot melt glue to adhere each into place. Trim each to obtain a snug fit ... enough to block the light but not enough to distort the baffle rows.

The final step in the light baffle process is to cut a black plastic garbage/trash bag to size that completely covers the light baffles. The bag serves two purposes ... it diffuses the light from the bright LED's that can be seen through the clear transparency lettering and it serves as an additional black barrier to prevent the light from showing through the black transparency layers and highlighting the baffles behind.

As an optional step, I cut vellum paper to size and curved it slightly over the LED's in each word cell. This method cancelled the effect of seeing each individual LED when viewed directly through the clear transparency lettering.
Written by AughtNaughtZero

If you found this post interesting, follow and support us.
Suggest for you:

Raspberry Pi 3 Day Project: Retro Gaming Suite

IoT enabled Aeroponics using Raspberry Pi 3

Raspberry Pi: Full Stack

Hands on Internet of Things: Get started with a Raspberry Pi

Monday, August 1, 2016

Gaze Across the Solar System with a 3D-Printed, Raspberry Pi TelescopeThese moon photos were taken by Brett Porter with his PiKon telescope.

https://school.codequs.com/p/SkuuRcw_

The PiKon telescope is a DIY astro-camera you can easily build at home, based on two disruptive technologies: 3D printing and Raspberry Pi cameras. Andy Kirby and I started it as a project for Sheffield University’s “Festival of the Mind” in September 2014 (with much duct tape and over-engineering!). We wanted to show how these technologies could put a homemade reflector telescope within the reach of anyone. The response was fantastic, with national press coverage in the U.K., and a successful Indiegogo campaign partnering with Darren Barker and WeDo3DPrinting in Sheffield.

We’re now offering everything from 3D files to a complete kit with 3D-printed components and optics. We even offer fully built PiKons for those who just want to create Raspberry Pi programs for astronomy. But we’re sharing our design and 3D files freely because we hope to establish a community where makers, astronomers, Pi programmers, and educators can share information, experiences, and of course, images.

HOW IT WORKS

The PiKon telescope is based on the Newtonian reflecting telescope. This 350-year-old design uses a concave mirror (objective) to form an image, which is examined using an eyepiece. The objective mirror is mounted in a tube and a secondary mirror is placed in the optical path at a 45° angle to allow the image to be viewed from the side of the tube.

The PiKon telescope is similar, but the image formed by the objective is focused onto a digital camera sensor instead. Because of the small size of the Pi camera board (25mm × 25mm), we can mount it directly in the optical path at prime focus. The amount of light lost by doing this is similar to the losses caused by mounting the 45° mirror in a conventional Newtonian design.

https://school.codequs.com/p/SkuuRcw_

BUILDING YOUR OWN PIKON

The PiKon telescope consists of two main assemblies based on 3D-printed parts. At the bottom of the scope, the mirror assembly holds a standard 4½” diameter spherical mirror.

https://school.codequs.com/p/SkuuRcw_

At the top of the scope, the spider assembly supports the Pi camera and lets you move it back and forth along the telescope axis to focus the image, using a rack and pinion setup. The camera sensor is exposed by unscrewing the lens on the Pi camera.

https://school.codequs.com/p/SkuuRcw_

The two assemblies are mounted into a simple telescope tube made of 6″ plastic pipe. In the U.K. we use ventilation duct; in the U.S., Scott Miller of San Francisco Amateur Astronomers worked with Make: to modify the 3D parts to fit standard PVC pipe.

Finally, we 3D printed an astronomical dovetail wedge mount that’s also fitted with a standard ¼-20 (¼” Whitworth) thread, so you can mount the telescope on either astro or photo tripods.

Images captured by the Pi camera can be viewed on a monitor plugged into the Raspberry Pi, then transferred to PC or Mac from the Pi’s microSD card or uploaded from the Pi straight to Dropbox (or similar) using an internet connection. (We’re excited to try it with the new Raspberry Pi 3’s built-in Wi-Fi!)

https://school.codequs.com/p/SkuuRcw_
These moon photos were taken by Brett Porter with his PiKon telescope.

https://school.codequs.com/p/SkuuRcw_

MIRRORS AND MAGNIFICATION

The PiKon telescope has a magnification factor of about 120X (based on the 600mm focal length and 3.6mm×2.4mm camera sensor) and a field of view of about ¼ degree. The moon subtends ½ degree at your eyeball, so the PiKon can see about half the moon at a time.

Spherical or parabolic mirrors can be used. Different focal lengths may also be used; just cut the telescope tube to length accordingly. To determine the focal length of a third-party mirror, simply image a distant object onto a piece of paper and measure the distance between mirror and paper. The PiKon is designed with a long travel on the focusing rack so it’s forgiving of small inaccuracies in measurement.

ASSEMBLY

UK builders can proceed directly to the PiKon assembly instructions online at PiKon’s Dropbox. These include a complete illustrated materials list, step-by-step photos, and tips for printing your own parts.  This page also includes the latest STL files for you to download for 3D printing.

US builders should first download the 3D files that Scott Miller is using with US-standard 5″ PVC pipe. Then proceed to the PiKon Assembly Instructions online at PiKon’s Dropbox.

Builders in any country should inspect all of these 3D files, and adjust their dimensions if necessary to fit standard pipe or duct that’s found in their area, different Pi enclosures, etc.

Here’s what Scott Miller had to say about his revised files in the US:

“I could not find lightweight 5 inch duct, so I used heavier 5 inch PVC pipe that had approximately the same inside diameter. I printed all of the UK files using black PLA and mounted them on the 5 inch PVC. (Except for the UK tripod mount because my scope was too heavy.)
“To improve aesthetics, I created three new parts printed with blue PLA:• Tubular adapter to fit over the front of the scope and covering the UK spider (Pipe Adapter.STL)• Round plate to attach to the back of the UK mirror base (Mirror Adapter.STL)• Tubular adapter to fit over back of the scope  (Mirror Extension.STL)I used the maximum length M8 bolts I could to attach the UK mirror mount to the UK mirror base and my mirror adapter, by trimming long M8 bolts to fit with a hacksaw.
“The UK Raspberry Pi Mount was too small for my Pi case, so I scaled it up a bit for a better fit.  (RaspPi Mount-scaled.STL)    I also printed and used two instead of just one of the UK Pi brackets that hold the Pi Mount to the telescope tube.
“I printed a more-weather-resistant Raspberry Pi case with red PLA by altering an OpenSCAD design I found on Thingiverse.  (raspi3-camera-top.STL and raspi3-camera-bottom.STL)
“Finally, to reduce the camera mount wobble/loose fit in the spider, I scaled up the width of the camera mount shaft and added a slight bezel to the shaft to provide more clearance with the cog I was using.  (camera mount-bezel.STL). “
TOUCHSCREEN CONTROL

https://school.codequs.com/p/SkuuRcw_

Brett Porter built the PiKon kit and wanted to make his telescope portable for field trips, so he baked his own touchscreen controller with a 2.8″ TFT display, 4 programmable buttons, and a 5200mAh lithium-ion battery that also powers the Pi and camera. It’s mounted right on the side of the scope. You’re looking at Brett’s moon photos above.

WIRELESS IPAD CONTROL

https://school.codequs.com/p/SkuuRcw_
Scott Miller’s PiKon telescope is controlled by his iPad.
If you’d rather take the control the telescope wirelessly, why not use a tablet? Scott Miller writes: “I’m using my iPad to control the PiKon via an ad-hoc network and the RPI-Cam-Web-Interface app instead of a hardwire connection to a PC.  The app allows you to take videos as well as images, and has a preview/download feature built in.”

Here are Scott’s “first light” moon photos:

https://school.codequs.com/p/SkuuRcw_
These moon photos were taken by Scott Miller with his PiKon telescope.
https://school.codequs.com/p/SkuuRcw_

https://school.codequs.com/p/SkuuRcw_

GOING FURTHER

One member of Newcastle Maker Space even mounted an accelerometer on the telescope to synchronize with a star map — we’re excited to hear more about that idea.

Build one and share your ideas with the community!
Written by :  Mark Wrigley and Matt Stultz

If you found this post interesting, follow and support us.
Suggest for you:

Raspberry Pi 3 Day Project: Retro Gaming Suite

IoT enabled Aeroponics using Raspberry Pi 3

Raspberry Pi: Full Stack

Hands on Internet of Things: Get started with a Raspberry Pi



Friday, July 29, 2016

Build a Wi-Fi Drone Disabler with Raspberry Pi_part1

Build a Pi-powered drone disabler to understand the security risks of wireless communications

https://school.codequs.com
Photo by Mike Senese
Please note: The information presented here is for educational purposes. As with all guides covering network and computer security, the techniques should only be performed on devices that you own or have permission to operate on. This tutorial is designed to help users understand the security implications of using unprotected wireless communications by exploring its use in a popular drone model: the Parrot AR.Drone 2.0.

It’s illegal to access computer systems that you don’t own or to damage other people’s property. As we continue the public dialogue on drone regulations, it’s critical to understand as many aspects of the issue as we can to include social impact, policy, privacy and of course, security. We hope that manufacturers take steps to improve the security of their products and users continue to educate themselves on the capabilities and vulnerabilities of emerging technologies. Make: and the author take no responsibility resulting from the inappropriate or illegal actions that result from abuse of any of the techniques discussed.

==============


Quadcopters capable of transmitting high-quality video are making it possible to affordably record unique perspectives. But these “unmanned aircraft systems,” as the FAA calls them, have posed new challenges in security, safety, and privacy, and many experts caution pilots to consider the implications of increased drone usage. In addition to the concern of constant surveillance, there’s the possibility that businesses (or hackers) can collect location information from mobile devices by using roving drones.
As a result, a cottage industry is forming for anti-drone technology. These devices come in a range of sizes, from plane-mounted to handheld tools. I will show you how to build our own rig to execute a particular network-based attack against one type of quadcopter control: Wi-Fi.

A WORD OF CAUTION

While I won’t touch on signal jamming or directed energy, it’s worth noting that jamming creates serious safety risks and is illegal. Additionally, the computer-based techniques that we’ll cover should only be done on networks and devices that you own, or have permission to experiment on.

WHY 802.11?

Wi-Fi is a key interface for many current quadcopters. Some use it as the interface between the controller and a tablet displaying mapping and telemetry data. A few drones, such as Parrot’s Bebop and AR.Drone 2.0, are entirely controlled via Wi-Fi. This type of system lowers the barriers to entry into the drone space since pilots can use their own devices for control, but it does create interesting security situations since existing network-based attacks can now be used against these devices. Modern drones are essentially flying computers, so many of the attacks that were developed for use against traditional computer systems are also effective. The AR.Drone 2.0 in particular has many impressive features and sensors that users can access, and its low cost makes it an ideal platform for experimentation and learning.

HOW IT WORKS

The AR.Drone 2.0 creates an access point that the user can connect to via a smartphone. The access point that it creates is named ardrone2_ followed by a random number. This access point by default is open and offers no authentication or encryption. Once a user connects the device to the access point, he or she can launch the app to begin control of the drone. This process, though convenient for the user, makes it easy to take control of the drone. The AR.Drone 2.0 is so hackable, in fact, that there are communities and competitions focused on modifying this particular drone.

OUR TEST

Using a laptop computer, USB Wi-Fi card, and our new antenna, we’ll explore a very simple attack. Power on the AR.Drone 2.0 and have a friend fly it around using the app. After a few seconds, its access point should also show up in your available wireless networks. Connect to the network and start up your favorite terminal application. The default gateway address for this network will have an address of 192.168.1.1. You’ll be able to telnet to this address since the service is, unfortunately, left wide open on this system.
Telnet is an older protocol for accessing remote computers. At this point, you can explore the system, or shut it off entirely without the legitimate user knowing what’s going on. Using a combination of freely available network tools, you can easily perform all these steps from your computer.

Now we’ll look at how you might automate this attack with a Raspberry Pi, a touchscreen, and a couple of Bash scripts.

I used a great tutorial provided by Adafruit (learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi) to set up my Raspberry Pi with a touchscreen, so that I could launch my attacks with a click. Assuming that you have a Pi already set up, let’s walk through how you could automate this.

The first step is to log into your Pi using SSH.

https://school.codequs.com
Change directory to the Pi’s desktop (or wherever you want) so that the scripts are easy to find and click.
https://school.codequs.com
Using your favorite text editor, create a new file. I named this join_network.sh because I’ll be using this to make the Pi automatically join the AR.Drone 2.0 access point.

https://school.codequs.com
Add these 8 lines to your script. On line 7, enter the full name of the AR.Drone 2.0 access point. Once you’re done, save everything.

https://school.codequs.com
You’re now going to automate the connection that you tested before and send an additional command to shut the drone down. Start by creating another script. I called mine poweroff.sh.

https://school.codequs.com
Add these lines to your script. This initiates a telnet connection to the drone, which is located at 192.168.1.1, and sends the command of poweroff, which tells the drone (which is a computer after all) to shut everything down.

https://school.codequs.com

Now make sure that the scripts are executable. Do this by typing sudo chmod u+x filename. Check this for both of the files; we can verify that they are now executable by typing ls -la and looking for the read, write, execute permissions rwx associated with the file.

https://school.codequs.com
The two scripts are ready to use. Be sure that no people or fragile items are below the drone when you’re testing. Have fun!

https://school.codequs.com







 Photo by Hep Svadja








Source: makezine ( continue )

If you feel useful for you and for everyone, please share it!
Suggest for you:





Thursday, July 28, 2016

Google reportedly working on bringing Android to the Raspberry Pi 3


When the original Raspberry Pi launched, it was billed as a tiny low-cost computer useful to tinkerers, enthusiasts, and as a way to teach kids the basics of coding. Over the last four years, the platform has evolved and improved — the current version of the Raspberry Pi (the Raspberry Pi 3) is a quad-core Cortex-A53 CPU at 1.2GHz with a VideoCore IV GPU clocked at 300-400MHz (3D clocked at 300MHz, video at 400MHz), 1GB of RAM, 802.11n wireless, and a rated power consumption of 4W. That’s not far off the specs of mid-to-low-end Android smartphones these days, and Google which hasn’t formally supported the RBP 3 with an operating system, appears to have taken notice. Multiple reports are suggesting that the company intends to formally support Raspberry Pi with its own version of the Android operating system.

The proof of the potential for such support is an empty folder in the Google repository for its AOSP (Android Open Source Project). There are a number of devices and branches listed in the master directory for AOSP, and many of them aren’t empty. Including the RBP 3 in this list would seem to indicate that Google intends to support the device with future code updates and an Android version. Currently, the RBP 3 is supported by certain Linux distros and even a Windows IoT variant, but bringing Android support to the diminutive computer would open up a world of options for the device.

https://school.codequs.com/
The Raspberry Pi, diagrammed by Element 14
The best thing about seeing a modern OS come to the Raspberry Pi would be the options it would open for building genuine systems around the hardware. Without intending any disrespect to Linux or Windows 10 IoT, these operating systems don’t have the depth or breadth of applications as Android does. As the RBP hardware continues to advance, it’ll likely close the gap between itself and modern smartphones or tablets by an additional margin — the current 1.2GHz quad-core Cortex-A57 design is a solid target, but it shouldn’t be hard for the Raspberry Pi Foundation to iterate on this base with higher clock speed targets for future designs. The Raspberry Pi and Raspberry Pi 2 were both built on 40nm process technology; it’s not clear if the Broadcom BCM2837 at the heart of the RBP 3 is based on 28nm tech or not. If it isn’t, then there’s definitely room to push the hardware further in future iterations of the platform while keeping power consumption steady.

If Google is serious about supporting the RBP 3 with Android — and absent an official confirmation, that is still an if — it’ll open the hardware up to new projects and capabilities, without detracting at all from its original mission to serve as an inexpensive introduction to computing and computer programming. While the company hasn’t announced anything yet, hopefully the surge of overall interest will spark an official statement.

Scource: extremetech
For more information please visit the website: https://school.codequs.com/