One of the most common baking questions I get is what to do when a recipe calls for instant yeast, but all you have is active dry. Just how different are they, and does it even matter which kind you use?
Central Park is prime bird real estate, and on Wednesday, a prime bird showed up. Birders flocked to the park to check out a snowy owl, the first recorded sighting of the bird in more than a century in the park. There’s something wildly incongruous about a stark-white owl on a baseball diamond in the heart of Manhattan…
The Rubik’s Cube has been around for decades. I’ve toyed with the cube, probably in the very late ‘80s or early ‘90s, but never even imagined being able to solve one; from entirely shuffled, to perfectly ordered. But wouldn’t it be satisfying if I co…
Zendaya dances around those big Spider-Man 3 casting rumors. Michael B. Jordan discusses his openness to return for Black Panther in some capacity. The Nevers has found a replacement for Joss Whedon. Plus, Mads Mikkelsen still has hope for more Hannibal, and what’s to come on the Valentines edition of Into the Dark.…
Reddit Chief Executive Officer Steve Huffman said on Thursday that the WallStreetBets forum is “by no means perfect but they’ve been well in the bounds of our content policy.” From a report: “With all of our communities that do their best to be good citizens of Reddit, we try to do our best by them as well,” Huffman said on the Clubhouse app. He called the forum’s outsize influence on GameStop stock a “culture war of Wall Street versus everybody else.” He said anyone who thinks the users of the forum are “idiots” should spend more time reading the discussions. “It’s this idiot swagger that masks what I think is this charming intelligence,” Huffman said. The forum’s unprecedented influence on GameStop’s stock shows that markets must adapt to a world where retail investors are gaining some of the power big financial firms have long held, according to Alexis Ohanian, co-founder of the online forum. “This is something, I think, for a lot of people, that was a statement as much as an investment,” Ohanian, who left Reddit’s board last year, said on Bloomberg Television on Thursday. “I’d equate it to, like, folks voting with their dollars in order to get back at or make a statement towards big finance.”
I never thought I’d hear the phrase “Windows 7″ ever again, but a Lifehacker reader recently reminded me that, yes, some people are still using Microsoft’s end-of-life operating system. It’s not that they wouldn’t want to upgrade, I assume, but some people just can’t; they probably tried, were met with an error…
The new Raspberry Pi Pico is very different from a traditional Raspberry Pi. Pico is a microcontroller, rather than a microcomputer. Unlike a Raspberry Pi it’s a platform you develop for, not a platform you develop on.
Blinking the onboard LED
But you still have choices if you want to develop for Pico, because there is both a C/C++ SDK and an official MicroPython port. Beyond that there are other options opening up, with a port of CircuitPython from Adafruit and the prospect of Arduino support, or even a Rust port.
Here I’m going to talk about how to get started with the C/C++ SDK, which lets you develop for Raspberry Pi Pico from your laptop or Raspberry Pi.
I’m going to assume you’re using a Raspberry Pi; after all, why wouldn’t you want to do that? But if you want to develop for Pico from your Windows or Mac laptop, you’ll find full instructions on how to do that in our Getting Started guide.
Blinking your first LED
When you’re writing software for hardware, the first program that gets run in a new programming environment is typically turning an LED on, off, and then on again. Learning how to blink an LED gets you halfway to anywhere. We’re going to go ahead and blink the onboard LED on Pico, which is connected to pin 25 of the RP2040 chip.
We’ve tried to make getting started with Raspberry Pi Pico as easy as possible. In fact, we’ve provided some pre-built binaries that you can just drag and drop onto your Raspberry Pi Pico to make sure everything is working even before you start writing your own code.
Go to the Getting Started page and click on the “Getting started with C/C++” tab, then the “Download UF2 file” button in the “Blink an LED” box.
A file called blink.uf2 will be downloaded to your computer. Go grab your Raspberry Pi Pico board and a micro USB cable. Plug the cable into your Raspberry Pi or laptop, then press and hold the BOOTSEL button on your Pico while you plug the other end of the micro USB cable into the board. Then release the button after the board is plugged in.
A disk volume called RPI-RP2 should pop up on your desktop. Double-click to open it, and then drag and drop the UF2 file into it. The volume will automatically unmount and the light on your board should start blinking.
Blinking an LED
Congratulations! You’ve just put code onto your Raspberry Pi Pico for the first time. Now we’ve made sure that we can successfully get a program onto the board, let’s take a step back and look at how we’d write that program in the first place.
Getting the SDK
Somewhat unsurprisingly, we’ve gone to a lot of trouble to make installing the tools you’ll need to develop for Pico as easy as possible on a Raspberry Pi. We’re hoping to make things easier still in the future, but you should be able to install everything you need by running a setup script.
However, before we do anything, the first thing you’ll need to do is make sure your operating system is up to date.
The script will do a lot of things behind the scenes to configure your Raspberry Pi for development, including installing the C/C++ command line toolchain and Visual Studio Code. Once it has run, you will need to reboot your Raspberry Pi.
The script has been tested and is known to work from a clean, up-to-date installation of Raspberry Pi OS. However, full instructions, along with instructions for manual installation of the toolchain if you prefer to do that, can be found in the “Getting Started” guide.
Once your Raspberry Pi has rebooted we can get started writing code.
Writing code for your Pico
There is a large amount of example code for Pico, and one of the things that the setup script will have done is to download the examples and build both the Blink and “Hello World” examples to verify that your toolchain is working.
But we’re going to go ahead and write our own.
We’re going to be working in the ~/pico directory created by the setup script, and the first thing we need to do is to create a directory to house our project.
If all goes well you should see a whole bunch of messages flash past in your Terminal window and a number of files will be generated in the build/ directory, including one called blink.uf2.
Just as we did before with the UF2 file we downloaded from the Getting Started page, we can now drag and drop this file on to our Pico.
Unplug the cable from your Pico, then press and hold the BOOTSEL button on your Pico and plug it back in. Then release the button after the board is plugged in.
The new blink.uf2 binary can be dragged and dropped on to our Pico
The RPI-RP2 disk volume should pop up on your desktop again. Double-click to open it, then open a file viewer in the pico/blink/build/ directory and drag and drop the UF2 file you’ll find there on to the RPI-RP2 volume. It will automatically unmount, and the light on your board should start blinking. But this time it will blink a little bit differently from before.
Try playing around with the sleep_ms( ) lines in our code to vary how much time there is between blinks. You could even take a peek at one of the examples, which shows you how to blink the onboard LED in Morse code.
Using Picotool
One way to convince yourself that the program running on your Pico is the one we just built is to use something called picotool. Picotool is a command line utility installed by the setup script that is a Swiss Army knife for all things Pico.
Go ahead and unplug your Pico from your Raspberry Pi, press and hold the BOOTSEL button, and plug it back in. Then run picotool.
You’ll see lots of information about the program currently on your Pico. Then if you want to start it blinking again, just unplug and replug Pico to leave BOOTSEL mode and start your program running once more.
Picotool can do a lot more than this, and you’ll find more information about it in Appendix B of the “Getting Started” guide.
Using Visual Studio Code
So far we’ve been building our Pico projects from the command line, but the setup script also installed and configured Visual Studio Code, and we can build the exact same CMake-based project in the Visual Studio Code environment. You can open it as below:
Chapter 6 of the Getting Started guide has full details of how to load and compile a Pico project inside Visual Studio Code. If you’re used to Visual Studio Code, you might be able to make your way from here without much extra help, as the setup script has done most of the heavy lifting for you in configuring the IDE.
What’s left is to open the pico/blink folder and allow the CMake Tools extension to configure the project. After selecting arm-none-eabi as your compiler, just hit the “Build’ button in the blue bottom bar.
Building our blink project inside Visual Studio Code
While we recommend and support Visual Studio Code as the development environment of choice for developing for Pico — it works cross-platform under Linux, Windows, and macOS and has good plugin support for debugging — you can also take a look at Chapter 9 of the Getting Started guide. There we talk about how to use both Eclipse and CLion to develop for Pico, and if you’re more used to those environments you should be able to get up and running in either without much trouble.
Where now?
If you’ve got this far, you’ve built and deployed your very first C program to your Raspberry Pi Pico. Well done! The next step is probably going to be saying “Hello World!” over serial back to your Raspberry Pi.
From here, you probably want to sit down and read the Getting Started guide I’ve mentioned throughout the article, especially if you want to make use of SWD debugging, which is discussed at length in the guide. Beyond that I’d point you to the book on the C/C++ SDK which has the API-level documentation, as well as a high-level discussion of the design of the SDK.
Support for developing for Pico can be found on the Raspberry Pi forums. There is also an (unofficial) Discord server where a lot of people active in the new community seem to be hanging out. Feedback on the documentation should be posted as an Issue to the pico-feedback repository on Github, or directly to the relevant repository it concerns.
All of the documentation, along with lots of other help and links, can be found on the same Getting Started page from which we grabbed our original UF2 file.
If you lose track of where that is in the future, you can always find it from your Pico: to access the page, just press and hold the BOOTSEL button on your Pico, plug it into your laptop or Raspberry Pi, then release the button. Go ahead and open the RPI-RP2 volume, and then click on the INDEX.HTM file.
Wireless charging already exists, in that you can juice up your smartphone without jamming a cable into its charging port. Instead, you plop it on a charging pad or stand. It’s convenient, sure, but it is not the end game. Getting us closer to wireless nirvana, Xiaomi has introduced its Mi Air Charge technology, which allows you to wirelessly
An anonymous reader quotes a report from Bloomberg: Robinhood, the trading app that’s popular with investors behind this month’s wildest stock swings, has drawn down some of its credit lines with banks, according to people with knowledge of the matter. The firm has tapped at least several hundred million dollars. The company’s lenders include JPMorgan Chase and Goldman Sachs, according to data compiled by Bloomberg.
“As a brokerage firm, we have many financial requirements, including SEC net capital obligations and clearinghouse deposits,” Robinhood said in a blog post Thursday. “Some of these requirements fluctuate based on volatility in the markets and can be substantial in the current environment. These requirements exist to protect investors and the markets and we take our responsibilities to comply with them seriously, including through the measures we have taken today.” In an interview late Thursday on CNBC, Robinhood Chief Executive Officer Vlad Tenev said the deposit requirements govern how much leeway the firm can give to customers who are buying stocks.
“We pulled those credit lines so that we could maximize within reason the funds we have to deposit at the clearinghouses,” Tenev said. The extreme volatility “generated substantial risk” for brokerages, resulting in the need for stricter requirements on those firms, according to the Depositary Trust & Clearing Corp. “When volatility increases, portfolio margin requirements increase too,” Wall Street clearinghouse DTCC said in an emailed statement.
Welcome to Morning Music, Kotaku’s ongoing hangout for folks who love video games and the cool-ass sounds they make. Today we look back to 1992, when, according to Philips, a classic became a legend. You can call it…Teshtris.
On top of aiming to use Wayland by default, another high profile change being worked on for this spring’s release of Ubuntu 21.04 is using link-time optimizations (LTO) for all 64-bit package builds…
In June of 1969, the BBC aired a documentary titled “Royal Family” that didn’t go over well with Buckingham Palace. In fact, Queen Elizabeth II banned the film and it hasn’t been seen since 1972. That is, until it was uploaded to YouTube this week.
For those Linux gamers and other desktop users of the open-source OpenGL/Vulkan drivers with some extra time this weekend, Mesa 21.0-RC3 is now available for testing as what might be the last release candidate before officially releasing Mesa 21.0 as soon as next week…
Germany is getting the uncut version of Left 4 Dead 2 at last, over 11 years after Valve released the game. The developer has announced on Steam that it recently asked German authorities to reevaluate the survival horror game and, as a result, can no…