Monthly Archives: March 2020

#FreePCB via Twitter to 2 random RTs

via Dangerous Prototypes

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

Name that Ware, March 2020

via Hacking – bunnie's blog

The ware for March 2020 is shown below.

XMOS! There’s a chip that brings back some memories.

Fortunately I still have some weird and miscellaneous gear hanging about my lab that I can take apart to keep name that ware going, without having to leave my home. That being said, I am definitely welcoming guest ware submissions! Hope everyone is staying safe and healthy in these strange times.

Winner, Name that Ware February 2020

via Hacking – bunnie's blog

The ware for February 2020 was a Young Model 32400 “serial interface” wind monitor.

The exact model is tricky, because the 32500 and the 32400 share a lot of the same circuitry, and the electric compass feature is mainly an add-on to the wind sensor so you can get an absolute direction of the wind rather an offset from an arbitrary zero point. So I’ll give Czajnick the win, congrats email me for your prize!

Also, it’s nice to see a tech company from Michigan.

Resources for Learning at Home

via SparkFun: Commerce Blog

We know that learning from home can be a stressful transition for you and the student(s) in your home. Between our Spring Kit Sale and resources from our SparkFun.com and SparkFunEducation.com sites, we’re here to help make the transition go as smoothly as it can.

If you're in need of some materials, be sure to shop our Spring Kit Sale - available through April 17th! Designed with beginners in mind, these kits offer a springboard into electronics through circuit building, creating e-textile projects, measuring the weather, practicing soldering, and exploring the Internet of Things (IoT).

Spring Kit Sale

If you’re looking for a particular item or ecosystem, check out our Education Materials page for a more robust list of our education-focused items.

We know teaching isn’t easy, but we have some handy resources that will hopefully help. With lessons on the basics of electronics to more advanced learning with coding, you will be able to help kids continue to learn from home.

Resources:

Between our current sale and our ever-growing list of resources, hopefully we can help make learning at home a little easier.

comments | comment feed

Code Hyper Sports’ shooting minigame | Wireframe #35

via Raspberry Pi

Gun down the clay pigeons in our re-creation of a classic minigame from Konami’s Hyper Sports. Take it away, Mark Vanstone

Hyper Sports

Hyper Sports’ Japanese release was tied in with the 1984 Summer Olympics.

Hyper Sports

Konami’s sequel to its 1983 arcade hit, Track & Field, Hyper Sports offered seven games – or events – in which up to four players could participate. Skeet shooting was perhaps the most memorable game in the collection, and required just two buttons: fire left and fire right.

The display showed two target sights, and each moved up and down to come into line with the next clay disc’s trajectory. When the disc was inside the red target square, the player pressed the fire button, and if their timing was correct, the clay disc exploded. Points were awarded for being on target, and every now and then, a parrot flew across the screen, which could be gunned down for a bonus.

Making our game

To make a skeet shooting game with Pygame Zero, we need a few graphical elements. First, a static background of hills and grass, with two clay disc throwers each side of the screen, and a semicircle where our shooter stands – this can be displayed first, every time our draw() function is called.

We can then draw our shooter (created as an Actor) in the centre near the bottom of the screen. The shooter has three images: one central while no keys are pressed, and two for the directions left and right when the player presses the left or right keys. We also need to have two square target sights to the left and right above the shooter, which we can create as Actors.

When the clay targets appear, the player uses the left and right buttons to shoot either the left or right target respectively.

To make the clay targets, we create an array to hold disc Actor objects. In our update() function we can trigger the creation of a new disc based on a random number, and once created, start an animation to move it across the screen in front of the shooter. We can add a shadow to the discs by tracking a path diagonally across the screen so that the shadow appears at the correct Y coordinate regardless of the disc’s height – this is a simple way of giving our game the illusion of depth. While we’re in the update() function, looping around our disc object list, we can calculate the distance of the disc to the nearest target sight frame, and from that, work out which is the closest.

When we’ve calculated which disc is closest to the right-hand sight, we want to move the sight towards the disc so that their paths intersect. All we need to do is take the difference of the Y coordinates, divide by two, and apply that offset to the target sight. We also do the same for the left-hand sight. If the correct key (left or right arrows) is pressed at the moment a disc crosses the path of the sight frame, we register a hit and cycle the disc through a sequence of exploding frames. We can keep a score and display this with an overlay graphic so that the player knows how well they’ve done.

And that’s it! You may want to add multiple players and perhaps a parrot bonus, but we’ll leave that up to you.

Here’s Mark’s code snippet, which creates a simple shooting game in Python. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code and assets, go here.

Get your copy of Wireframe issue 35

You can read more features like this one in Wireframe issue 35, available now at Tesco, WHSmith, and all good independent UK newsagents.

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 35 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 Hyper Sports’ shooting minigame | Wireframe #35 appeared first on Raspberry Pi.