Enginursday: Secure DIY Garage Door Opener

via SparkFun: Commerce Blog

Are you concerned with the security weaknesses found in most garage door openers? Join us as we highlight a DIY solution using the SparkFun Cryptographic Co-processor. Using all Qwiic boards, we created a super-secure garage door opener!

We've also written a complete tutorial on how to create your own. Check that out here:

New!

Secure DIY Garage Door Opener

January 16, 2020

Did you know that most garage doors are at risk of a roll jam attack? Here we make a DIY garage door remote-control system that is much more secure than most commercial-ready products using the latest in ECC cryptography.

At its core, this project is a wireless button controller, so it could be used for many other applications. The next step is upping the security of the car key FOB to avoid roll-jam attacks. What might you use this security for?

comments | comment feed

Code a Boulder Dash mining game | Wireframe #30

via Raspberry Pi

Learn how to code a simple Boulder Dash homage in Python and Pygame. Mark Vanstone shows you how. 

The original Boulder Dash was marked out by some devious level design, which threatened to squash the player at every turn.

Boulder Dash

Boulder Dash first appeared in 1984 for the Commodore 64, Apple II, and the Atari 400/800. It featured an energetic gem collector called Rockford who, thanks to some rather low-resolution graphics, looked a bit like an alien. His mission was to tunnel his way through a series of caves to find gems while avoiding falling rocks dislodged by his digging. Deadly creatures also inhabited the caves which, if destroyed by dropping rocks on them, turned into gems for Rockford to collect.

The ingenious level designs were what made Boulder Dash so addictive. Gems had to be collected within a time limit to unlock the exit, but some were positioned in places that would need planning to get to, often using the physics of falling boulders to block or clear areas. Of course, the puzzles got increasingly tough as the levels progressed.

Written by Peter Liepa and Chris Gray, Boulder Dash was published by First Star Software, which still puts out new versions of the game to this day. Due to its original success, Boulder Dash was ported to all kinds of platforms, and the years since have seen no fewer than 20 new iterations of Boulder Dash, and a fair few clones, too.

Our homage to Boulder Dash running in Pygame Zero. Dig through the caves to find gems – while avoiding death from above.

Making Boulder Dash in Python

We’re going to have a look at the boulder physics aspect of the game, and make a simple level where Rockford can dig out some gems and hopefully not get flattened under an avalanche of rocks. Writing our code in Pygame Zero, we’ll automatically create an 800 by 600-size window to work with. We can make our game screen by defining a two-dimensional list, which, in this case, we will fill with soil squares and randomly position the rocks and gems.

Each location in the list matrix will have a name: either wall for the outside boundary, soil for the diggable stuff, rock for a round, moveable boulder, gem for a collectable item, and finally, rockford to symbolise our hero. We can also define an Actor for Rockford, as this will make things like switching images and tracking other properties easier.

Here’s Mark’s code, which gets an homage to Boulder Dash running in Python. To get it working on your system, you’ll first need to install Pygame Zero. And to download the full code, go here.

Our draw() function is just a nested loop to iterate through the list matrix and blit to the screen whatever is indicated in each square. The Rockford Actor is then drawn over the top. We can also keep a count of how many gems have been collected and provide a congratulatory message if all of them are found. In the update() function, there are only two things we really need to worry about: the first being to check for keypresses from the player and move Rockford accordingly, and the second to check rocks to see if they need to move.

Rockford is quite easy to test for movement, as he can only move onto an empty square – a soil square or a gem square. It’s also possible for him to push a boulder if there’s an empty space on the other side. For the boulders, we need to first test if there’s an empty space below it, and if so, the boulder must move downwards. We also test to see if a boulder is on top of another boulder – if it is, the top boulder can roll off and down onto a space either to the left or the right of the one beneath.
There’s not much to add to this snippet of code to turn it into a playable game of Boulder Dash. See if you can add a timer, some monsters, and, of course, some puzzles for players to solve on each level.

Testing for movement

An important thing to notice about the process of scanning through the list matrix to test for boulder movement is that we need to read the list from the bottom upwards; otherwise, because the boulders move downwards, we may end up testing a boulder multiple times if we test from the beginning to the end of the list. Similarly, if we read the list matrix from the top down, we may end up moving a boulder down and then when reading the next row, coming across the same one again, and moving it a second time.

Get your copy of Wireframe issue 30

You can read more features like this one in Wireframe issue 30, available now at Tesco, WHSmith, all good independent UK newsagents, and the Raspberry Pi Store, Cambridge.

Or you can buy Wireframe directly from Raspberry Pi Press — delivery is available worldwide. And if you’d like a handy digital version of the magazine, you can also download issue 30 for free in PDF format.

Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

The post Code a Boulder Dash mining game | Wireframe #30 appeared first on Raspberry Pi.

New products: D36V50Fx Step-Down Voltage Regulators

via Pololu Blog

We have a new set of regulators to announce: the D36V50Fx family of step-down voltage regulators. Measuring a compact 1″ × 1″, these regulators support input voltages up to 50 V and can typically deliver around 5 A of current, although some versions can output much more under certain conditions.

Step-Down Voltage Regulator D36V50Fx, bottom view with dimensions.

The family consists of six fixed output voltage versions between 3.3 V and 12 V:

We can also manufacture a customized version for you here in our Las Vegas facility. For example, we could make regulators with a different output voltage that your project needs, or we could replace the 40 V reverse voltage protection MOSFET with a 20 V one for slightly improved efficiency if your input voltage will always be lower than 20 V. If you are interested in customization, please contact us us for more information.

Comparison to other regulators

D36V28Fx and D36V50Fx Step-Down Voltage Regulators.

The D36V50Fx regulators are larger and more powerful counterparts to the D36V28Fx family we introduced last year, with the same input voltage ranges and mostly similar characteristics. What distinguishes the two families in performance is that the D36V50Fx regulators can provide roughly double the output current! (At the high end of the input voltage range, the difference is generally less dramatic.)

Comparison of the maximum continuous current of Step-Down Voltage Regulators D36V50Fx and D36V28Fx.

And since many of our most popular regulators are 5 V modules, here is a graph comparing the new D36V50F5 (in blue) with two of our older high-power regulators, the D24V90F5 and the D24V50F5:

Comparison of the maximum continuous current of 5V Step-Down Voltage Regulators D36V50F5, D24V90F5, and D24V50F5.

Introductory special

As usual, we are offering an extra introductory special discount on these new regulators, to help share in our celebration of releasing a new product. The first hundred customers to use coupon code D36V50XINTRO can get up to 3 units of each version for just $11.95 each!

Basic LED Animations With Arduino

via SparkFun: Commerce Blog

Still wondering what to do with LEDs after finishing the SparkFun Inventor's Kit v4.1 for Arduino? Try checking out the Basic LED Animations for Beginners tutorial for more examples! We'll explore LEDs using the SparkFun RedBoard Qwiic to blink, fade and sequence several LEDs for different projects.

Basic LED Animations for Beginners (Arduino)

December 3, 2019

Let's have some fun with LEDs! We'll explore LEDs once again with the SparkFun RedBoard Qwiic, making cool effects, and putting those effects to work using a sensor.

Looking for more tutorials related to LEDs? Check out our tutorials tagged with LEDs to add more glow to your projects!

comments | comment feed

Protect your veggies from hail with a Raspberry Pi Zero W

via Raspberry Pi

Tired of losing vegetable crops to frequent summertime hail storms, Nick Rogness decided to build something to protect them. And the result is brilliant!

Digital Garden with hail protection

Tired of getting your garden destroyed by hail storms? I was, so I did something about it…maker style!

“I live in a part of the country where hail and severe weather are commonplace during the summer months,” Nick explains in his Hackster tutorial. “I was getting frustrated every year when my wife’s garden was get demolished by the nightly hail storms losing our entire haul of vegetable goodies!”

Nick drew up plans for a solution to his hail problem, incorporating liner actuators bolted to a 12ft × 12ft frame that surrounds the vegetable patch. When a storm is on the horizon, the actuators pull a heavy-duty tarp over the garden.

Nick connected two motor controllers to a Raspberry Pi Zero W. The Raspberry Pi then controls the actuators to pull the tarp, either when a manual rocker switch is flipped or when it’s told to do so via weather-controlled software.

“Software control of the garden was accomplished by using a Raspberry Pi and MQTT to communicate via Adafruit IO to reach the mobile app on my phone,” Nick explains. The whole build is powered by a 12V Marine deep-cycle battery that’s charged using a solar panel.

You can view the full tutorial on Hackster, including the code for the project.

The post Protect your veggies from hail with a Raspberry Pi Zero W appeared first on Raspberry Pi.

Come Work for SparkFun!

via SparkFun: Commerce Blog

Hello everyone! If you have ever been interested in working with SparkFun, now is a perfect time to take a look at our Job Openings page! The link for job openings is typically found at the bottom of any SparkFun website page, but because we are celebrating our 17th Anniversary and have six unique job postings, we wanted to make sure that this is brought to the attention of any one who might be interested! Many of these positions are closing soon (some even within the week) so don't delay! Please note that none of these positions are remote, so if you are in the surrounding area of Niwot, Colorado, this might be the perfect opportunity for you!

Join the SparkFun team!


Engineering:

  • Software Engineer - Working closely with other members of our Engineering team, the Software Engineer is responsible for the software components of the products we build for single board computers (Raspberry Pi, Nvidia Jetson, etc), ensuring the developed solutions deliver the desired functionality and meet user expectations.

Marketing Communications

  • Technical Content Creator - This role is responsible for creating technical content to support product launches/product families, technology focus areas, and marketing campaigns/initiatives. This role is constantly learning about, applying and sharing new technologies with both new and existing SparkFun audiences. Research, collaboration, and measurement are all critical aspects to the success of this role!

Production

  • Machine Operator (Day Shift) - The Machine Operator is responsible for running a variety of pieces of machinery including stencil printers, pick and place machines, reflow ovens, selective solder machines, board washers, and automated optical inspection (AOI) machines. This is the start of the overall board assembly process, and is an integral one in setting the pace for the rest of the assembly process. Prior PCB assembly equipment operations experience is not required. We will train the candidate that is best fit for the position.
  • Packager - The Packager is responsible for ensuring that in-house assembled PCB products are safe for transport and storage in the warehouse. They are the final step in the overall Board Assembly process. The Packager is also responsible for assembling Light Packaged Assemblies, which are things like buttons, switches, sensors, transmitters and receivers.

Sales Operations - Business Development

  • Customer Support Representative - This role often serves as the first line of human interaction with customers and potential customers. The ultimate goal of this position is to ensure those that reach out to SparkFun have great experience with us - positive, proactive, efficient, value-add, beneficial, and resolution oriented. This role acts as the face of SparkFun and has a great impact on customer relationships and loyalty.

Software & IT

  • Software Developer - SparkFun's newest Software Developer will be a contributing member of our software development team. Projects will range from simple UI updates on SparkFun's e-commerce website to building out complex, business-critical features for SparkFun's ERP system. The ideal candidate will need to be comfortable with various modern web technologies such as PHP, JavaScript, CSS, HTML and relational databases such as MySQL or Postgres.

Do you have what it takes to join the SparkFun team? We'd love to have you apply and become a "'Funion!"

comments | comment feed