Monthly Archives: December 2019

How to run a script at start-up on a Raspberry Pi using crontab

via Raspberry Pi

Do you need to run a script whenever your Raspberry Pi turns on? Here’s Estefannie to explain how to edit crontab to do exactly that.

How to start a script at start-up on a Raspberry Pi // LEARN SOMETHING

Do you want your Raspberry Pi to automatically run your code when it is connected to power? Then you are in the right place. In this new #LEARNSOMETHING video I show you how to make you Raspberry Pi run your script automatically when it is connected to a power source.

Running script on startup

While there are many ways of asking your Raspberry Pi to run a script on start-up, crontab -e is definitely one of the easiest.

AND, as Estefannie explains (in part thanks to me bullying asking her to do so), if you create a run folder on your desktop, you can switch out the Python scripts you want to run at start-up whenever you like and will never have to edit crontab again!


Now go write some wonderful and inspiring festive scripts while I take a well-earned nap. I just got off a plane yet here I am, writing blog posts for y’all because I love you THAT DARN MUCH!

Teddy perfectly demonstrating my jet-lagged expression

And don’t forget to like and subscribe for more Estefannie Explains it All goodness!

The post How to run a script at start-up on a Raspberry Pi using crontab appeared first on Raspberry Pi.

All About LEDs

via SparkFun: Commerce Blog

LEDs, or Light Emitting Diodes, are the single most common way to add light to your project. If you want something to glow, blink, flash or otherwise add some light to your life, an LED is what you need! LEDs come in many different colors, packages, brightnesses and technologies. With so many options, you’ll have many things to consider as you plan your project and choose the best LED for your needs. Luckily for you, we’ve put together a page dedicated to everything you need to know about LEDs! Get a quick overview of how LEDs work, a product list and maybe even some inspiration for your next project.

Let us know about projects you'd like to see, or other resources you’d like to see covered, in the comments below.

comments | comment feed

#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.

Badges? We Don’t Need no Stinking – Wait, We Definitely Need this Badge

via SparkFun: Commerce Blog

If you made it to the 2019 Hackaday Superconference, then you’ve already gotten your hands on this year’s amazing badge. If you weren’t able to attend the Supercon this year, then you’ve probably been relegated to staring at it longingly from afar, and this year’s badge is definitely worthy of our admiration.


Gaze at it in wide-eyed wonder! (Original image ©Lucasfilm Ltd)

The brainchild of Jeroen Domburg (Sprite_TM), this year’s badge is in a Gameboy form factor and packs quite a punch. It holds an ECP5 45K LUT FPGA - a huge chip, especially for a badge; 16MiB SPI RAM and 16MiB flash memory; a 480x 320 LCD display;a mono audio output (you’ll need to solder a speaker to J3 to hear anything); IrDA, to allow for a little wireless communication; a PMOD connectors, the standard for peripherals used with FPGAs; a pair of upgraded SAO connectors; a micro-USB connector and an HDMI-compatible connector, in case you want your badge to have an enormous screen; and finally, there’s a 40-pin 2.54 mm female breakout header, and every person who gets a badge will also get a protoboard cartridge that includes a flash memory chip and plugs right in. Oh, and if you really bork your badge, you've got JTAG access as well!

alt text

Each badge includes a protoboard cartridge with an on-board flash memory chip

The FPGA chip has 381 connections, over 200 of which are IO. With this many possible connections, and the speed at which the deadline arrived, typos on the silkscreen were possible. Probable. Inevitable. For example, on the PMOD connector, the pin numbers are in fact upside-down from what the silkscreen indicates. Additionally, on the SAO header, SDA and SDL are flipped as are the GPIO 1 and GPIO 2. Luckily, according to Jereon, all of the lines are just IOs to the FPGA, so you can fix the issue by just picking a different IO line. He also suggests that if you do use any of these lines, you just throw a multimeter on them to make sure that information is being sent where you want it.

alt text

With the rush to production, a few errors were made in the silkscreen. (Image from Jeroen Domburg)

Many people may be hesitant to jump into the FPGA pool because generally you are forced to work in Verilog or VHDL. As a way to make the badge more accessible to those not completely comfortable writing in hardware description language, Domburg basically wrote a microcontroller into the fabric of the FPGA. This makes it possible to program the microcontroller in the soft-core, as if you were programming an ARM, PIC or AVR-based board.

alt text

Nyan cat demos the graphics display, but there is so much more that can be done with it.

The idea behind the Hackaday Supercon Badge is, of course, to hack it. You can find everything you need to get started over on Hackaday's site, and at Sprite_TM's GitHub repo. That will help you set up your gateway, SDK, and show you how to start hacking your badge, but what if you need some ideas as to what to hack? Take a look at the Badge Hacking Ceremony, and get inspiration from some amazing coders developers, and engineers who were there.

comments | comment feed

Raspberry Pi capacitive-touch musical Christmas tree

via Raspberry Pi

What, your Christmas tree ISN’T touch-enabled?

Capacitive Touch Christmas Tree How To | Raspberry Pi | Bare Conductive Pi Cap

Turn your Christmas tree into a capacitive touch-interactive musical instrument using a Raspberry Pi and a Bare Conductive Pi Cap. You’ll be rocking around the Christmas tree in no time! /* Bare Conductive */ Pi Cap: Touch Board: Code: #RasberryPi #BareConductive #Christmas

Using the Bare Conductive Pi Cap, Davy Wybiral hooked up his fairy lights and baubles to a Raspberry Pi. The result? Musical baubles that allow the user to play their favourite festive classics at the touch of a finger. These baubles are fantastic, and it’s easy to make your own. Just watch the video for Davy’s how-to.

The code for Bare Conductive’s Pi Cap polyphonic touch MP3 utility can be found in this GitHub repo, and you can pick up a Pi Cap on the Bare Conductive website. Then all you need to do is hook up your favourite tree decorations to the Pi Cap via insulated wires, and you’re good to go. It’s OK if your decorations aren’t conductive: you’ll actually be touching the wires and not the ornaments themselves.

And don’t worry about touching the wires, it’s perfectly safe. But just in this instance. Please don’t make a habit of touching wires.

Make sure to subscribe to Davy on YouTube (we did) and give him a like for the baubles video. Also, leave a comment to tell him how great it is, because nice comments are lovely, and we should all be leaving as many of them as we can on the videos for our favourite creators.

The post Raspberry Pi capacitive-touch musical Christmas tree appeared first on Raspberry Pi.