All posts by Eben Upton

Raspberry Pi 4 on sale now from $35

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/

We have a surprise for you today: Raspberry Pi 4 is now on sale, starting at $35. This is a comprehensive upgrade, touching almost every element of the platform. For the first time we provide a PC-like level of performance for most users, while retaining the interfacing capabilities and hackability of the classic Raspberry Pi line.

Raspberry Pi 4: your new $35 computer

Get your Raspberry Pi 4 now: http://rpf.io/ytraspberrypi4 #RaspberryPi4 Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Get yours today from our Approved Resellers, or from the Raspberry Pi Store in Cambridge, open today 8am–8pm!

Raspberry Pi 4 Model B

Here are the highlights:

  • A 1.5GHz quad-core 64-bit ARM Cortex-A72 CPU (~3× performance)
  • 1GB, 2GB, or 4GB of LPDDR4 SDRAM
  • Full-throughput Gigabit Ethernet
  • Dual-band 802.11ac wireless networking
  • Bluetooth 5.0
  • Two USB 3.0 and two USB 2.0 ports
  • Dual monitor support, at resolutions up to 4K
  • VideoCore VI graphics, supporting OpenGL ES 3.x
  • 4Kp60 hardware decode of HEVC video
  • Complete compatibility with earlier Raspberry Pi products

And here it is in the flesh:

Still a handsome devil

Raspberry Pi 4 memory options

This is the first time we’re offering a choice of memory capacities. We’ve gone for the following price structure, retaining our signature $35 price for the entry-level model:

RAMRetail price
1GB$35
2GB$45
4GB$55

As always these prices exclude sales tax, import duty (where appropriate), and shipping. All three variants are launching today: we have initially built more of the 2GB variant than of the others, and will adjust the mix over time as we discover which one is most popular.

New Raspberry Pi 4, new features

At first glance, the Raspberry Pi 4 board looks very similar to our previous $35 products, all the way back to 2014’s Raspberry Pi 1B+. James worked hard to keep it this way, but for the first time he has made a small number of essential tweaks to the form factor to accommodate new features.

Power

We’ve moved from USB micro-B to USB-C for our power connector. This supports an extra 500mA of current, ensuring we have a full 1.2A for downstream USB devices, even under heavy CPU load.

An extra half amp, and USB OTG to boot

Video

To accommodate dual display output within the existing board footprint, we’ve replaced the type-A (full-size) HDMI connector with a pair of type-D (micro) HDMI connectors.

Seeing double

Ethernet and USB

Our Gigabit Ethernet magjack has moved to the top right of the board, from the bottom right, greatly simplifying PCB routing. The 4-pin Power-over-Ethernet (PoE) connector remains in the same location, so Raspberry Pi 4 remains compatible with the PoE HAT.

Through the looking glass

The Ethernet controller on the main SoC is connected to an external Broadcom PHY over a dedicated RGMII link, providing full throughput. USB is provided via an external VLI controller, connected over a single PCI Express Gen 2 lane, and providing a total of 4Gbps of bandwidth, shared between the four ports.

All three connectors on the right-hand side of the board overhang the edge by an additional millimetre, with the aim of simplifying case design. In all other respects, the connector and mounting hole layout remains the same, ensuring compatibility with existing HATs and other accessories.

New Raspbian software

To support Raspberry Pi 4, we are shipping a radically overhauled operating system, based on the forthcoming Debian 10 Buster release. This brings numerous behind-the-scenes technical improvements, along with an extensively modernised user interface, and updated applications including the Chromium 74 web browser. Simon will take an in-depth look at the changes in tomorrow’s blog post, but for now, here’s a screenshot of it in action.

Raspbian Buster desktop

Some advice for those who are keen to get going with Raspbian Buster right away: we strongly recommend you download a new image, rather than upgrading an existing card. This ensures that you’re starting with a clean, working Buster system. If you really, really want to try upgrading, make a backup first.

One notable step forward is that for Raspberry Pi 4, we are retiring the legacy graphics driver stack used on previous models. Instead, we’re using the Mesa “V3D” driver developed by Eric Anholt at Broadcom over the last five years. This offers many benefits, including OpenGL-accelerated web browsing and desktop composition, and the ability to run 3D applications in a window under X. It also eliminates roughly half of the lines of closed-source code in the platform.

New Raspberry Pi 4 accessories

Connector and form-factor changes bring with them a requirement for new accessories. We’re sensitive to the fact that we’re requiring people to buy these: Mike and Austin have worked hard to source good-quality, cost-effective products for our reseller and licensee partners, and to find low-cost alternatives where possible.

Raspberry Pi 4 Case

Gordon has been working with our design partners Kinneir Dufort and manufacturers T-Zero to develop an all-new two-part case, priced at $5.

New toy, new toy box

We’re very pleased with how this has turned out, but if you’d like to re-use one of our existing cases, you can simply cut away the plastic fins on the right-hand side and omit one of the side panels as shown below.

Quick work with a Dremel

Raspberry Pi 4 Power Supply

Good, low-cost USB-C power supplies (and USB-C cables) are surprisingly hard to find, as we discovered when sending out prototype units to alpha testers. So we worked with Ktec to develop a suitable 5V/3A power supply; this is priced at $8, and is available in UK (type G), European (type C), North American (type A) and Australian (type I) plug formats.

Behold the marvel that is BS 1363

If you’d like to re-use a Raspberry Pi 3 Official Power Supply, our resellers are offering a $1 adapter which converts from USB micro-B to USB-C. The thick wires and good load-step response of the old official supply make this a surprisingly competitive solution if you don’t need a full 3 amps.

Somewhat less marvellous, but still good

Raspberry Pi 4 micro HDMI Cables

Again, low-cost micro HDMI cables which reliably support the 6Gbps data rate needed for 4Kp60 video can be hard to find. We like the Amazon Basics cable, but we’ve also sourced a 1m cable, which will be available from our resellers for $5.

Official micro HDMI to HDMI cable

Updated Raspberry Pi Beginner’s Guide

At the end of last year, Raspberry Pi Press released the Official Raspberry Pi Beginner’s Guide. Gareth Halfacree has produced an updated version, covering the new features of Raspberry Pi 4 and our updated operating system.

Little computer people

Raspberry Pi 4 Desktop Kit

Bringing all of this together, we’re offering a complete Desktop Kit. This is priced at $120, and comprises:

  • A 4GB Raspberry Pi 4
  • An official case
  • An official PSU
  • An official mouse and keyboard
  • A pair of HDMI cables
  • A copy of the updated Beginner’s Guide
  • A pre-installed 32GB microSD card

Raspberry Pi Desktop Kit

Raspberry Pi Store

This is the first product launch following the opening of our store in Cambridge, UK. For the first time, you can come and buy Raspberry Pi 4 directly from us, today. We’ll be open from 8am to 8pm, with units set up for you to play with and a couple of thousand on hand for you to buy. We even have some exclusive launch-day swag.

The Raspberry Pi Store sign

Form an orderly line

If you’re in the bottom right-hand corner of the UK, come on over and check it out!

New Raspberry Pi silicon

Since we launched the original Raspberry Pi in 2012, all our products have been based on 40nm silicon, with performance improvements delivered by adding progressively larger in-order cores (Cortex-A7, Cortex-A53) to the original ARM11-based BCM2835 design. With BCM2837B0 for Raspberry Pi 3B+ we reached the end of that particular road: we could no longer afford to toggle more transistors within our power budget.

Raspberry Pi 4 is built around BCM2711, a complete re-implementation of BCM283X on 28nm. The power savings delivered by the smaller process geometry have allowed us to replace Cortex-A53 with the much more powerful, out-of-order, Cortex-A72 core; this can execute more instructions per clock, yielding performance increases over Raspberry Pi 3B+ of between two and four times, depending on the benchmark.

We’ve taken advantage of the process change to overhaul many other elements of the design. We moved to a more modern memory technology, LPDDR4, tripling available bandwidth; we upgraded the entire display pipeline, including video decode, 3D graphics and display output to support 4Kp60 (or dual 4Kp30) throughput; and we addressed the non-multimedia I/O limitations of previous devices by adding on-board Gigabit Ethernet and PCI Express controllers.

Raspberry Pi 4 FAQs

We’ll keep updating this list over the next couple of days, but here are a few to get you started.

Wait, is it 2020 yet?

In the past, we’ve indicated 2020 as a likely introduction date for Raspberry Pi 4. We budgeted time for four silicon revisions of BCM2711 (A0, B0, C0, and C1); in comparison, we ship BCM2835C2 (the fifth revision of that design) on Raspberry Pi 1 and Zero.

Fortunately, 2711B0 has turned out to be production-ready, which has taken roughly 9–12 months out of the schedule.

Are you discontinuing earlier Raspberry Pi models?

No. We have a lot of industrial customers who will want to stick with the existing products for the time being. We’ll keep building these models for as long as there’s demand. Raspberry Pi 1B+, 2B, 3B, and 3B+ will continue to sell for $25, $35, $35, and $35 respectively.

What about a Model A version?

Historically, we’ve produced cut-down, lower-cost, versions of some of our $35 products, including Model 1A+ in 2014, and Model 3A+ at the end of last year. At present we haven’t identified a sensible set of changes to allow us to do a “Model 4A” product at significantly less than $35. We’ll keep looking though.

What about the Compute Module?

CM1, CM3, and CM3+ will continue to be available. We are evaluating options for producing a Compute Module product based on the Raspberry Pi 4 chipset.

Are you still using VideoCore?

Yes. VideoCore 3D is the only publicly documented 3D graphics core for ARM‑based SoCs, and we want to make Raspberry Pi more open over time, not less.

Credits

A project like Raspberry Pi 4 is the work of many hundreds of people, and we always try to acknowledge some of those people here.

This time round, particular credit is due to James Adams, who designed the board itself (you’ll find his signature under the USB 3.0 socket); to Mike Buffham, who ran the commercial operation, working with suppliers, licensees, and resellers to bring our most complicated product yet to market; and to all those at Raspberry Pi and Broadcom who have worked tirelessly to make this product a reality over the last few years.

A partial list of others who made major direct contributions to the BCM2711 chip program, CYW43455, VL805, and MxL7704 integrations, DRAM qualification, and Raspberry Pi 4 itself follows:

James Adams, Cyrus Afghahi, Snehil Agrawal, Sam Alder, Kiarash Amiri, Andrew Anderson, Eng Lim Ang, Eric Anholt, Greg Annandale, Satheesh Appukuttan, Amy Au, Ben Avison, Matt Bace, Neil Bailey, Jock Baird, Scott Baker, Alix Ball, Giles Ballard, Paul Barnes, Russell Barnes, Fiona Batchelor, Alex Bate, Kris Baxter, Paul Beech, Michael Belhazy, Jonathan Bell, John Bellairs, Oguz Benderli, Doug Berger, Ron Berthiaume, Raj Bharadwaj, Geoff Blackman, Ed Bleich, Debbie Brandenburg, David Brewer, Daniel Brierton, Adam Brown, Mike Buffham, Dan Caley, Mark Calleja, Rob Canaway, Cindy Cao, Victor Carmon, Ian Carter, Alex Carter, Amy Carter, Mark Castruita, KK Chan, Louis Chan, Nick Chase, Sherman Chen, Henry Chen, Yuliang Cheng, Chun Fai Cheung, Ravi Chhabra, Scott Clark, Tim Clifford, Nigel Clift, Dom Cobley, Steve Cole, Philip Colligan, Stephen Cook, Sheena Coote, Sherry Coutu, John Cowan-Hughes, John Cox, Peter Coyle, Jon Cronk, Darryl Cross, Steve Dalton, Neil Davies, Russell Davis, Tom De Vall, Jason Demas, Todd DeRego, Ellie Dobson, David Doyle, Alex Eames, Nicola Early, Jeff Echtenkamp, Andrew Edwards, Kevin Edwards, Phil Elwell, Dave Emett, Jiin Taur Eng, Gabrielle England, YG Eom, Peggy Escobedo, Andy Evans, Mark Evans, Florian Fainelli, David Ferguson, Ilan Finkelstein, Nick Francis, Liam Fraser, Ian Furlong, David Gammon, Jan Gaterman, Eric Gavami, Doug Giles, Andrew Goros, Tim Gover, Trevor Gowen, Peter Green, Simon Greening, Tracey Gregory, Efim Gukovsky, Gareth Halfacree, Mark Harris, Lucy Hattersley, James Hay, Richard Hayler, Gordon Henderson, Leon Hesch, Albert Hickey, Kevin Hill, Stefan Ho, Andrew Hoare, Lewis Hodder, William Hollingworth, Gordon Hollingworth, Michael Horne, Wanchen Hsu, David Hsu, Kevin YC Huang, Pei Huang, Peter Huang, Scofield Huang, James Hughes, Andy Hulbert, Carl Hunt, Rami Husni, Steven Hwang, Incognitum, Bruno Izern, Olivier Jacquemart, Mini Jain, Anurag Jain, Anand Jain, Geraint James, Dinesh Jayabharathi, Vinit Jayaraj, Nick Jeffery, Mengjie Jiang, David John, Alison Johnston, Lily Jones, Richard Jones, Tony Jones, Gareth Jones, Gary Kao, Gary Keall, Gerald Kelly, Ian Kersley, Gerard Khoo, Dani Kidouchim, Phil King, Andreas Knobloch, Bahar Kordi-Borojeni, Claire Kuo, Nicole Kuo, Wayne Kusumo, Koen Lampaert, Wyn Landon, Trever Latham, William Lee, Joon Lee, William Lee, Dave Lee, Simon Lewis, David Lewsey, Sherman Li, Xizhe Li, Jay Li, John CH Lin, Johan Lin, Jonic Linley, Chris Liou, Lestin Liu, Simon Long, Roy Longbottom, Patrick Loo, James Lougheed, Janice Lu, Fu Luo-Larson, Jeff Lussier, Helen Lynn, Terence Mackown, Neil MacLeod, Kevin Malone, Shahin Maloyan, Tim Mamtora, Stuart Martin, Simon Martin, Daniel Mason, Karen Matulis, Andrea Mauri, Scott McGregor, Steven Mcninch, Ben Mercer, Kamal Merchant, James Mills, Vassil Mitov, Brendan Moran, Alan Morgan, Giorgia Muirhead, Fiacre Muller, Aram Nahidipour, Siew Ling Ng, Thinh Nguyen, Lee Nguyen, Steve Noh, Paul Noonan, Keri Norris, Rhian Norris, Ben Nuttall, Brian O’Halloran, Martin O’Hanlon, Yong Oh, Simon Oliver, Mandy Oliver, Emma Ormond, Shiji Pan, Christopher Pasqualino, Max Passell, Naush Patuck, Eric Phiri, Dominic Plunkett, Karthik Rajendran, Ashwin Rao, Nick Raptopoulos, Chaitanya Ray, Justin Rees, Hias Reichl, Lorraine Richards, David Richardson, Tim Richardson, Dan Riiff, Peter de Rivaz, Josh Rix, Alwyn Roberts, Andrew Robinson, Kevin Robinson, Paul Rolfe, Marcelo Romero, Jonathan Rosenfeld, Sarah Roth, Matt Rowley, Matthew Rowley, Dave Saarinen, Ali Salem, Suzie Sanders, Graham Sanderson, Aniruddha Sane, Marion Scheuermann, Serge Schneider, Graham Scott, Marc Scott, Saran Kumar Seethapathi, Shawn Shadburn, Abdul Shaik, Mark Skala, Graham Smith, Michael Smith, Martin Sperl, Ajay Srivastava, Nick Steele, Ben Stephens, Dave Stevenson, Mike Stimson, Chee Siong Su, Austin Su, Prem Swaroop, Grant Taylor, Daniel Thompsett, Stuart Thomson, Eddie Thorn, Roger Thornton, Chris Tomlinson, Stephen Toomey, Mohamed Toubella, Frankie Tsai, Richard Tuck, Mike Unwin, Liz Upton, Manoj Vajhallya, Sandeep Venkatadas, Divya Vittal, John Wadsworth, Stefan Wahren, Irene Wang, Jeremy Wang, Rich Wells, Simon West, Joe Whaley, Craig Wightman, Oli Wilkin, Richard Wilkins, Sarah Williams, Jack Willis, Rob Wilson, Luke Wren, Romona Wu, Zheng Xu, Paul Yang, Pawel Zackiewicz, Ling Zhang, Jean Zhou, Ulf Ziemann, Rob Zwetsloot.

If you’re not on this list and think you should be, please let me know, and accept my apologies.

The post Raspberry Pi 4 on sale now from $35 appeared first on Raspberry Pi.

New product: Raspberry Pi 3 Model A+ on sale now at $25

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/new-product-raspberry-pi-3-model-a/

TL;DR: you can now get the 1.4GHz clock speed, 5GHz wireless networking and improved thermals of Raspberry Pi 3B+ in a smaller form factor, and at the smaller price of $25. Meet the Raspberry Pi 3 Model A+.

New Product Alert: Raspberry Pi 3A+

You can now get the 1.4GHz clock speed, 5GHz wireless networking and improved thermals of Raspberry Pi 3B+ in a smaller form factor, and at the smaller price of $25. Meet the Raspberry Pi 3 Model A+.

Raspberry Pi 3 Model A+

Long-time readers will recall that back in 2014 the original Raspberry Pi 1 Model B+ was followed closely by a cut-down Model A+. By halving the RAM to 256MB, and removing the USB hub and Ethernet controller, we were able to hit a lower price point, and squeeze the product down to the size of a HAT.

Raspberry Pi 3 Model A+

Small but perfectly formed

Although we didn’t make A+ form-factor versions of Raspberry Pi 2 or 3, it has been one of our most frequently requested “missing” products. Now, with Raspberry Pi 3 Model B+ shipping in volume, we’re able to fill that gap by releasing Raspberry Pi 3 Model A+.

Phenomenal cosmic powers! Itty-bitty living space

Raspberry Pi 3 Model A+ incorporates most of the neat enhancements we made to its big brother, and features:

  • A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU
  • 512MB LPDDR2 SDRAM
  • Dual-band 802.11ac wireless LAN and Bluetooth 4.2/BLE
  • Improved USB mass-storage booting
  • Improved thermal management

Like its big brother, the entire board is certified as a radio module under FCC rules, which in turn will significantly reduce the cost of conformance testing Raspberry Pi–based products.

In some ways this is rather a poignant product for us. Back in March, we explained that the 3+ platform is the final iteration of the “classic” Raspberry Pi: whatever we do next will of necessity be less of an evolution, because it will need new core silicon, on a new process node, with new memory technology. So 3A+ is about closing things out in style, answering one of our most frequent customer requests, and clearing the decks so we can start to think seriously about what comes next.

Just in case

Our official cases for Raspberry Pi 3B and 3B+ and Raspberry Pi Zero have been very popular, so of course we wanted to offer a case for this new device.

Raspberry Pi 3 Model A+ in case without lid
Raspberry Pi 3 Model A+ in case without lid
Raspberry Pi 3 Model A+ in case

Unfortunately it’s not quite ready yet, but as you can see it’s rather pretty: we’re expecting it to be available from the start of December, just in time to serve as a stocking filler for the geek in your life.

The post New product: Raspberry Pi 3 Model A+ on sale now at $25 appeared first on Raspberry Pi.

Learn to write games for the BBC Micro with Eben

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/learn-to-write-games-for-the-bbc-micro-with-eben/

Long-time fans of the Raspberry Pi will know that we were inspired to make a programmable computer for kids by our own experiences with a machine called the BBC Micro, which many of us learned with in the 1980s.

This post is the first of what’s going to be an irregular series where I’ll walk you through building the sort of game we used to play when we were kids. You’ll need a copy of BeebEm (scroll down for a Linux port if you’re using a Pi – but this tutorial can be carried out on a PC or Mac as well as on an original BBC Micro if you have access to one).

I’m going to be presenting the next game in this series, tentatively titled Eben Goes Skiing, at the Centre for Computing History in Cambridge at 2pm this afternoon – head on down if you’d like to learn how to make scrolling ascii moguls.

Helicopter tutorial

We’re going to build a simple helicopter game in BBC BASIC. This will demonstrate a number of neat features, including user-defined characters, non-blocking keyboard input using INKEY, and positioning text and graphics using PRINT TAB.

Let’s start with user-defined characters. These provide us with an easy way to create a monochrome 8×8-pixel image by typing in 8 small numbers. As an example, let’s look at our helicopter sprite:

Each column pixel position in a row is “worth” a different power of 2, from 1 for the rightmost pixel up to 128 for the leftmost. To generate our 8 numbers, we process one row at a time, adding up the value for each occupied pixel position. We can now create custom character number 226 using the VDU 23 command. To display the character, we change to a graphics mode using the MODE command and display it using the PRINT command.

Type the following:

10MODE 2

70VDU 23,226,0,248,32,116,126,116,112,0

RUN

PRINT CHR$(226)

You should see the little helicopter on the screen just above your prompt. Let’s define some more characters for our game, with character numbers 224 through 229. These represent leftward and rightward flying birds, a rightward flying helicopter, the surface of the sea, and a landing pad.

Type the following:

50VDU 23,224,0,14,12,104,16,28,8,0

60VDU 23,225,0,112,48,22,8,56,16,0

80VDU 23,227,0,31,4,46,126,46,14,0

90VDU 23,228,0,102,255,255,255,255,255,255

100VDU 23,229,255,255,0,0,0,0,0,0

Trying running your program and using print to view the new characters!

Now we’re ready to use our sea and platform characters to build the game world. Mode 2 on the BBC Micro has 20 character positions across, and 32 down. We’ll draw 20 copies of the sea character in row 30 (remember, rows and columns are numbered from zero) using a FOR loop and the PRINT TAB command, and pick a random position for the platform using the RND() function.

Type the following:

110FOR I%=0 TO 19

120PRINT TAB(I%,30) CHR$(228);

130NEXT

140P%=RND(20)-1

150PRINT TAB(P%,30) CHR$(229);

RUN

You should see something like this:

Don’t worry about that cursor and prompt: they won’t show up in the finished game.

It’s time to add the helicopter. We’ll create variables X% and Y% to hold the position of the helicopter, and Z% to tell us if it last moved left or right. We’ll initialise X% to a random position, Y% to the top of the screen, and Z% to zero, meaning “left”. We can use PRINT TAB again to draw the helicopter (either character 226 or 227 depending on Z%) at its current position. The whole thing is wrapped up in a REPEAT loop, which keeps executing until the helicopter reaches the ground (in row 29).

Type the following:

160X%=RND(20)-1:Y%=0:Z%=0

180REPEAT

260PRINT TAB(X%,Y%) CHR$(226+Z%);

290UNTIL Y%=29

RUN

You’ll see the helicopter sitting at the top of the screen.

We’re almost there: let’s give our helicopter the ability to move left, right and down. On each trip round the loop, we move down one row, and use the INKEY() function to read the Z and X keys on the keyboard. If Z is pressed, and we’re not already at the left of the
screen, we move one column left. If X is pressed, and we’re not already at the right of the screen, we move one column right.

Type the following:

210IF INKEY(-98) AND X%>0 THEN X%=X%-1:Z%=0

220IF INKEY(-67) AND X%<19 THEN X%=X%+1:Z%=1

230Y%=Y%+1

RUN

You should see something like this:

The game is much, much too fast to control, and the helicopter leaves trails: not surprising, as we didn’t do anything to erase the previous frame. Let’s use PRINT TAB to place a “space” character over the previous position of the helicopter, and add an empty FOR loop to slow things down a bit.

Type the following:

190PRINT TAB (%,Y%)"";

280FOR I%=1 TO 200:NEXT

RUN

Much better! This is starting to feel like a real game. Let’s finish it off by:

  • Adding a bird that flies back and forth
  • Detecting whether you hit the pad or not
  • Getting rid of the annoying cursor using a “magic” VDU 23 command
  • Putting an outer loop in to let you play again

Type the following:

20REPEAT

30CLS

40VDU 23,1,0;0;0;0;

170A%=RND(18):B%=10:C%=RND(2)-1

200PRINT TAB(A%,B%) "";

240A%=A%+2*C%-1

250IF A%=0 OR A%=19 THEN C%=1-C%

270PRINT TAB(A%,B%) CHR$(224+C%);

300IF X%=P% PRINT TAB(6,15) "YOU WIN" ELSE PRINT TAB(6,15) "YOU
LOSE"

310PRINT TAB(4,16) "PRESS SPACE"

320REPEAT UNTIL INKEY(-99)

330UNTIL FALSE

RUN

And here it is in all its glory.

You might want to try adding some features to the game: collision with the bird, things to collect, vertical scrolling. The sky’s the limit!

I created a full version of the game, using graphics from our very own Sam Alder, for the Hackaday 1K challenge; you can find it here.

Appendix

Here’s the full source for the game in one block. If you get errors when you run your code, type:

MODE 0
LIST

And compare the output very carefully with what you see here.

10MODE 2
20REPEAT
30CLS
40VDU 23,1,0;0;0;0;
50VDU 23,224,0,14,12,104,16,28,8,0   
60VDU 23,225,0,112,48,22,8,56,16,0
70VDU 23,226,0,248,32,116,126,116,112,0
80VDU 23,227,0,31,4,46,126,46,14,0
90VDU 23,228,0,102,255,255,255,255,255,255
100VDU 23,229,255,255,0,0,0,0,0,0
110FOR I%=0 TO 19
120PRINT TAB(I%,30) CHR$(228);
130NEXT
140P%=RND(20)-1
150PRINT TAB(P%,30) CHR$(229);
160X%=RND(20)-1:Y%=0:Z%=0
170A%=RND(18):B%=10:C%=RND(2)-1
180REPEAT
190PRINT TAB(X%,Y%) " ";
200PRINT TAB(A%,B%) " ";  
210IF INKEY(-98) AND X%>0 THEN X%=X%-1:Z%=0  
220IF INKEY(-67) AND X%<19 THEN X%=X%+1:Z%=1
230Y%=Y%+1
240A%=A%+2*C%-1
250IF A%=0 OR A%=19 THEN C%=1-C%
260PRINT TAB(X%,Y%) CHR$(226+Z%);
270PRINT TAB(A%,B%) CHR$(224+C%);
280FOR I%=1 TO 200:NEXT
290UNTIL Y%=29
300IF X%=P% PRINT TAB(6,15) "YOU WIN" ELSE PRINT TAB(6,15) "YOU LOSE"
310PRINT TAB(4,16) "PRESS SPACE"
320REPEAT UNTIL INKEY(-99)
330UNTIL FALSE


The post Learn to write games for the BBC Micro with Eben appeared first on Raspberry Pi.

Coolest Projects International 2018

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/coolest-projects-international-2018/

Like many engineers, I have folder upon folder of half-completed projects on my computer. But the funny thing is that this wasn’t a problem for me as a child. Every other Friday evening, I’d spend two hours at Ilkley Computer Club, where I could show off whatever I’d been working on: nothing motivates you to actually finish a project like the opportunity to share it with an audience.




Raspberry Jams, Code Clubs, and CoderDojos all provide children (of all ages: we’re looking at you, Peter Onion) with a place where they can learn, share ideas, and make cool stuff with code and computers. But you can get so involved with the things you’re working on that you forget to take a step back every once in a while to look at what you’ve accomplished. And what do you do when you’ve shown your project to everyone you know, and you fancy a shot at a slightly larger audience?

Enter Coolest Projects International, now in its seventh year. Here’s a video that captures about 1% of the awesomeness of being there in person.

Celebrating Coolest Projects International 2018

Coolest Projects is a world-leading showcase that empowers and inspires the next generation of digital creators, innovators, changemakers, and entrepreneurs. This year, for the first time, we brought Coolest Projects to the UK for a spectacular regional event in London!

Coolest Projects brings Ninjas from CoderDojos across the globe together in Dublin for a chance to share their work with the world, and to compete to be coolest in one of several categories:

  • Scratch projects
  • Websites
  • Games
  • Mobile apps
  • Hardware
  • Evolution (basically, next-level stuff)

At this year’s event, more than 1000 children presented projects, from 15 countries including Argentina, Bulgaria, Italy, Japan, Romania, and Spain.

Raspberry Pi on Twitter

This is it! #CoolestProjects https://t.co/eoepjNWLsC

And for the first time, Coolest Projects was open to Raspberry Jam and Code Club members, and to the broader Raspberry Pi community.

Liz, our daughter Aphra, and I spent the day at the event, along with the CoderDojo team, what felt like half the Raspberry Pi Foundation, keynote speaker Pete Lomas, and the most amazing army of volunteers. Between chugging slushies, I had the opportunity to judge hardware projects with Noel King, CoderDojo volunteer and co-founder of Coolest Projects. Noel provided the judges with a pep talk at the start of the day. He reminded us that the aim wasn’t necessarily to find the most complete, or polished, or technically audacious project, but to seek out creativity: the project that does something unique, or does something you’ve seen before but in a unique way.




To my mind, the focus on creativity is what sets Coolest Projects apart. This is, after all, a contest that aims to “empower and inspire the next generation of digital creators, innovators, changemakers, and entrepreneurs”, and that recognises that each of those activities is, at heart, a creative pursuit.

Unsurprisingly, given the strength of the field, judging went on for some time. Each category’s winner and runner-up were exceptional, and there were countless other projects that didn’t quite make the cut but that I’d be proud to have made myself. Where were these folks when I was a teenager?

You can see the winners and runners up in each category on the Coolest Projects Twitter feed, and you should also check out the winners of the six special prizes. One that especially struck me was Selin Alara Ornek’s project, iC4U, a robot guide dog that she developed at her local CoderDojo in Turkey.

While Coolest Projects started in Dublin, it’s now an international phenomenon. In the last couple of months we’ve seen Coolest Projects regional events in Belgium, Romania, and the UK.

Showcasing your projects at Coolest Projects UK 2018

Coolest Projects is a world-leading showcase that empowers and inspires the next generation of digital creators, innovators, changemakers, and entrepreneurs. This year, for the first time, we brought Coolest Projects to the UK for a spectacular regional event in London!

In September we’ll be holding the inaugural Coolest Projects North America at the Discovery Cube in Orange County.

Coolest Projects began as a volunteer-run event, and we’re immensely privileged to have this wonderful showcase for our community. We are enormously grateful to all the staff and volunteers who continue to give huge amounts of their time, effort, and talent every year to make it the wonderful event that it is. Thank you, all of you.

Events like these give me hope that the future of our industry will be every bit as exciting, and vastly more diverse, than our past and present. If you have a chance to participate in one of them, I think you’ll come away feeling the same.

The post Coolest Projects International 2018 appeared first on Raspberry Pi.

Raspberry Pi 3 Model B+ on sale now at $35

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/raspberry-pi-3-model-bplus-sale-now-35/

Here’s a long post. We think you’ll find it interesting. If you don’t have time to read it all, we recommend you watch this video, which will fill you in with everything you need, and then head straight to the product page to fill yer boots. (We recommend the video anyway, even if you do have time for a long read. ‘Cos it’s fab.)

A BRAND-NEW PI FOR π DAY

Raspberry Pi 3 Model B+ is now on sale now for $35, featuring: – A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU – Dual-band 802.11ac wireless LAN and Bluetooth 4.2 – Faster Ethernet (Gigabit Ethernet over USB 2.0) – Power-over-Ethernet support (with separate PoE HAT) – Improved PXE network and USB mass-storage booting – Improved thermal management Alongside a 200MHz increase in peak CPU clock frequency, we have roughly three times the wired and wireless network throughput, and the ability to sustain high performance for much longer periods.

If you’ve been a Raspberry Pi watcher for a while now, you’ll have a bit of a feel for how we update our products. Just over two years ago, we released Raspberry Pi 3 Model B. This was our first 64-bit product, and our first product to feature integrated wireless connectivity. Since then, we’ve sold over nine million Raspberry Pi 3 units (we’ve sold 19 million Raspberry Pis in total), which have been put to work in schools, homes, offices and factories all over the globe.

Those Raspberry Pi watchers will know that we have a history of releasing improved versions of our products a couple of years into their lives. The first example was Raspberry Pi 1 Model B+, which added two additional USB ports, introduced our current form factor, and rolled up a variety of other feedback from the community. Raspberry Pi 2 didn’t get this treatment, of course, as it was superseded after only one year; but it feels like it’s high time that Raspberry Pi 3 received the “plus” treatment.

So, without further ado, Raspberry Pi 3 Model B+ is now on sale for $35 (the same price as the existing Raspberry Pi 3 Model B), featuring:

  • A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU
  • Dual-band 802.11ac wireless LAN and Bluetooth 4.2
  • Faster Ethernet (Gigabit Ethernet over USB 2.0)
  • Power-over-Ethernet support (with separate PoE HAT)
  • Improved PXE network and USB mass-storage booting
  • Improved thermal management

Alongside a 200MHz increase in peak CPU clock frequency, we have roughly three times the wired and wireless network throughput, and the ability to sustain high performance for much longer periods.

Behold the shiny

Raspberry Pi 3B+ is available to buy today from our network of Approved Resellers.

New features, new chips

Roger Thornton did the design work on this revision of the Raspberry Pi. Here, he and I have a chat about what’s new.

Introducing the Raspberry Pi 3 Model B+

Raspberry Pi 3 Model B+ is now on sale now for $35, featuring: – A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU – Dual-band 802.11ac wireless LAN and Bluetooth 4.2 – Faster Ethernet (Gigabit Ethernet over USB 2.0) – Power-over-Ethernet support (with separate PoE HAT) – Improved PXE network and USB mass-storage booting – Improved thermal management Alongside a 200MHz increase in peak CPU clock frequency, we have roughly three times the wired and wireless network throughput, and the ability to sustain high performance for much longer periods.

The new product is built around BCM2837B0, an updated version of the 64-bit Broadcom application processor used in Raspberry Pi 3B, which incorporates power integrity optimisations, and a heat spreader (that’s the shiny metal bit you can see in the photos). Together these allow us to reach higher clock frequencies (or to run at lower voltages to reduce power consumption), and to more accurately monitor and control the temperature of the chip.

Dual-band wireless LAN and Bluetooth are provided by the Cypress CYW43455 “combo” chip, connected to a Proant PCB antenna similar to the one used on Raspberry Pi Zero W. Compared to its predecessor, Raspberry Pi 3B+ delivers somewhat better performance in the 2.4GHz band, and far better performance in the 5GHz band, as demonstrated by these iperf results from LibreELEC developer Milhouse.

Tx bandwidth (Mb/s)Rx bandwidth (Mb/s)
Raspberry Pi 3B35.735.6
Raspberry Pi 3B+ (2.4GHz)46.746.3
Raspberry Pi 3B+ (5GHz)102102

The wireless circuitry is encapsulated under a metal shield, rather fetchingly embossed with our logo. This has allowed us to certify the entire board as a radio module under FCC rules, which in turn will significantly reduce the cost of conformance testing Raspberry Pi-based products.

We’ll be teaching metalwork next.

Previous Raspberry Pi devices have used the LAN951x family of chips, which combine a USB hub and 10/100 Ethernet controller. For Raspberry Pi 3B+, Microchip have supported us with an upgraded version, LAN7515, which supports Gigabit Ethernet. While the USB 2.0 connection to the application processor limits the available bandwidth, we still see roughly a threefold increase in throughput compared to Raspberry Pi 3B. Again, here are some typical iperf results.

Tx bandwidth (Mb/s)Rx bandwidth (Mb/s)
Raspberry Pi 3B94.195.5
Raspberry Pi 3B+315315

We use a magjack that supports Power over Ethernet (PoE), and bring the relevant signals to a new 4-pin header. We will shortly launch a PoE HAT which can generate the 5V necessary to power the Raspberry Pi from the 48V PoE supply.

There… are… four… pins!

Coming soon to a Raspberry Pi 3B+ near you

Raspberry Pi 3B was our first product to support PXE Ethernet boot. Testing it in the wild shook out a number of compatibility issues with particular switches and traffic environments. Gordon has rolled up fixes for all known issues into the BCM2837B0 boot ROM, and PXE boot is now enabled by default.

Clocking, voltages and thermals

The improved power integrity of the BCM2837B0 package, and the improved regulation accuracy of our new MaxLinear MxL7704 power management IC, have allowed us to tune our clocking and voltage rules for both better peak performance and longer-duration sustained performance.

Below 70°C, we use the improvements to increase the core frequency to 1.4GHz. Above 70°C, we drop to 1.2GHz, and use the improvements to decrease the core voltage, increasing the period of time before we reach our 80°C thermal throttle; the reduction in power consumption is such that many use cases will never reach the throttle. Like a modern smartphone, we treat the thermal mass of the device as a resource, to be spent carefully with the goal of optimising user experience.

This graph, courtesy of Gareth Halfacree, demonstrates that Raspberry Pi 3B+ runs faster and at a lower temperature for the duration of an eight‑minute quad‑core Sysbench CPU test.

Note that Raspberry Pi 3B+ does consume substantially more power than its predecessor. We strongly encourage you to use a high-quality 2.5A power supply, such as the official Raspberry Pi Universal Power Supply.

FAQs

We’ll keep updating this list over the next couple of days, but here are a few to get you started.

Are you discontinuing earlier Raspberry Pi models?

No. We have a lot of industrial customers who will want to stick with the existing products for the time being. We’ll keep building these models for as long as there’s demand. Raspberry Pi 1B+, Raspberry Pi 2B, and Raspberry Pi 3B will continue to sell for $25, $35, and $35 respectively.

What about Model A+?

Raspberry Pi 1A+ continues to be the $20 entry-level “big” Raspberry Pi for the time being. We are considering the possibility of producing a Raspberry Pi 3A+ in due course.

What about the Compute Module?

CM1, CM3 and CM3L will continue to be available. We may offer versions of CM3 and CM3L with BCM2837B0 in due course, depending on customer demand.

Are you still using VideoCore?

Yes. VideoCore IV 3D is the only publicly-documented 3D graphics core for ARM‑based SoCs, and we want to make Raspberry Pi more open over time, not less.

Credits

A project like this requires a vast amount of focused work from a large team over an extended period. Particular credit is due to Roger Thornton, who designed the board and ran the exhaustive (and exhausting) RF compliance campaign, and to the team at the Sony UK Technology Centre in Pencoed, South Wales. A partial list of others who made major direct contributions to the BCM2837B0 chip program, CYW43455 integration, LAN7515 and MxL7704 developments, and Raspberry Pi 3B+ itself follows:

James Adams, David Armour, Jonathan Bell, Maria Blazquez, Jamie Brogan-Shaw, Mike Buffham, Rob Campling, Cindy Cao, Victor Carmon, KK Chan, Nick Chase, Nigel Cheetham, Scott Clark, Nigel Clift, Dominic Cobley, Peter Coyle, John Cronk, Di Dai, Kurt Dennis, David Doyle, Andrew Edwards, Phil Elwell, John Ferdinand, Doug Freegard, Ian Furlong, Shawn Guo, Philip Harrison, Jason Hicks, Stefan Ho, Andrew Hoare, Gordon Hollingworth, Tuomas Hollman, EikPei Hu, James Hughes, Andy Hulbert, Anand Jain, David John, Prasanna Kerekoppa, Shaik Labeeb, Trevor Latham, Steve Le, David Lee, David Lewsey, Sherman Li, Xizhe Li, Simon Long, Fu Luo Larson, Juan Martinez, Sandhya Menon, Ben Mercer, James Mills, Max Passell, Mark Perry, Eric Phiri, Ashwin Rao, Justin Rees, James Reilly, Matt Rowley, Akshaye Sama, Ian Saturley, Serge Schneider, Manuel Sedlmair, Shawn Shadburn, Veeresh Shivashimper, Graham Smith, Ben Stephens, Mike Stimson, Yuree Tchong, Stuart Thomson, John Wadsworth, Ian Watch, Sarah Williams, Jason Zhu.

If you’re not on this list and think you should be, please let me know, and accept my apologies.

The post Raspberry Pi 3 Model B+ on sale now at $35 appeared first on Raspberry Pi.

Happy birthday to us!

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/happy-birthday-2018/

The eagle-eyed among you may have noticed that today is 28 February, which is as close as you’re going to get to our sixth birthday, given that we launched on a leap day. For the last three years, we’ve launched products on or around our birthday: Raspberry Pi 2 in 2015; Raspberry Pi 3 in 2016; and Raspberry Pi Zero W in 2017. But today is a snow day here at Pi Towers, so rather than launching something, we’re taking a photo tour of the last six years of Raspberry Pi products before we don our party hats for the Raspberry Jam Big Birthday Weekend this Saturday and Sunday.

Prehistory

Before there was Raspberry Pi, there was the Broadcom BCM2763 ‘micro DB’, designed, as it happens, by our very own Roger Thornton. This was the first thing we demoed as a Raspberry Pi in May 2011, shown here running an ARMv6 build of Ubuntu 9.04.

BCM2763 micro DB

Ubuntu on Raspberry Pi, 2011-style

A few months later, along came the first batch of 50 “alpha boards”, designed for us by Broadcom. I used to have a spreadsheet that told me where in the world each one of these lived. These are the first “real” Raspberry Pis, built around the BCM2835 application processor and LAN9512 USB hub and Ethernet adapter; remarkably, a software image taken from the download page today will still run on them.

Raspberry Pi alpha board, top view

Raspberry Pi alpha board

We shot some great demos with this board, including this video of Quake III:

Raspberry Pi – Quake 3 demo

A little something for the weekend: here’s Eben showing the Raspberry Pi running Quake 3, and chatting a bit about the performance of the board. Thanks to Rob Bishop and Dave Emett for getting the demo running.

Pete spent the second half of 2011 turning the alpha board into a shippable product, and just before Christmas we produced the first 20 “beta boards”, 10 of which were sold at auction, raising over £10000 for the Foundation.

The beginnings of a Bramble

Beta boards on parade

Here’s Dom, demoing both the board and his excellent taste in movie trailers:

Raspberry Pi Beta Board Bring up

See http://www.raspberrypi.org/ for more details, FAQ and forum.

Launch

Rather to Pete’s surprise, I took his beta board design (with a manually-added polygon in the Gerbers taking the place of Paul Grant’s infamous red wire), and ordered 2000 units from Egoman in China. After a few hiccups, units started to arrive in Cambridge, and on 29 February 2012, Raspberry Pi went on sale for the first time via our partners element14 and RS Components.

Pallet of pis

The first 2000 Raspberry Pis

Unboxing continues

The first Raspberry Pi from the first box from the first pallet

We took over 100000 orders on the first day: something of a shock for an organisation that had imagined in its wildest dreams that it might see lifetime sales of 10000 units. Some people who ordered that day had to wait until the summer to finally receive their units.

Evolution

Even as we struggled to catch up with demand, we were working on ways to improve the design. We quickly replaced the USB polyfuses in the top right-hand corner of the board with zero-ohm links to reduce IR drop. If you have a board with polyfuses, it’s a real limited edition; even more so if it also has Hynix memory. Pete’s “rev 2” design made this change permanent, tweaked the GPIO pin-out, and added one much-requested feature: mounting holes.

Revision 1 versus revision 2

If you look carefully, you’ll notice something else about the revision 2 board: it’s made in the UK. 2012 marked the start of our relationship with the Sony UK Technology Centre in Pencoed, South Wales. In the five years since, they’ve built every product we offer, including more than 12 million “big” Raspberry Pis and more than one million Zeros.

Celebrating 500,000 Welsh units, back when that seemed like a lot

Economies of scale, and the decline in the price of SDRAM, allowed us to double the memory capacity of the Model B to 512MB in the autumn of 2012. And as supply of Model B finally caught up with demand, we were able to launch the Model A, delivering on our original promise of a $25 computer.

A UK-built Raspberry Pi Model A

In 2014, James took all the lessons we’d learned from two-and-a-bit years in the market, and designed the Model B+, and its baby brother the Model A+. The Model B+ established the form factor for all our future products, with a 40-pin extended GPIO connector, four USB ports, and four mounting holes.

The Raspberry Pi 1 Model B+ — entering the era of proper product photography with a bang.

New toys

While James was working on the Model B+, Broadcom was busy behind the scenes developing a follow-on to the BCM2835 application processor. BCM2836 samples arrived in Cambridge at 18:00 one evening in April 2014 (chips never arrive at 09:00 — it’s always early evening, usually just before a public holiday), and within a few hours Dom had Raspbian, and the usual set of VideoCore multimedia demos, up and running.

We launched Raspberry Pi 2 at the start of 2015, pairing BCM2836 with 1GB of memory. With a quad-core Arm Cortex-A7 clocked at 900MHz, we’d increased performance sixfold, and memory fourfold, in just three years.

Nobody mention the xenon death flash.

And of course, while James was working on Raspberry Pi 2, Broadcom was developing BCM2837, with a quad-core 64-bit Arm Cortex-A53 clocked at 1.2GHz. Raspberry Pi 3 launched barely a year after Raspberry Pi 2, providing a further doubling of performance and, for the first time, wireless LAN and Bluetooth.

All our recent products are just the same board shot from different angles

Zero to hero

Where the PC industry has historically used Moore’s Law to “fill up” a given price point with more performance each year, the original Raspberry Pi used Moore’s law to deliver early-2000s PC performance at a lower price. But with Raspberry Pi 2 and 3, we’d gone back to filling up our original $35 price point. After the launch of Raspberry Pi 2, we started to wonder whether we could pull the same trick again, taking the original Raspberry Pi platform to a radically lower price point.

The result was Raspberry Pi Zero. Priced at just $5, with a 1GHz BCM2835 and 512MB of RAM, it was cheap enough to bundle on the front of The MagPi, making us the first computer magazine to give away a computer as a cover gift.

Cheap thrills

MagPi issue 40 in all its glory

We followed up with the $10 Raspberry Pi Zero W, launched exactly a year ago. This adds the wireless LAN and Bluetooth functionality from Raspberry Pi 3, using a rather improbable-looking PCB antenna designed by our buddies at Proant in Sweden.

Up to our old tricks again

Other things

Of course, this isn’t all. There has been a veritable blizzard of point releases; RAM changes; Chinese red units; promotional blue units; Brazilian blue-ish units; not to mention two Camera Modules, in two flavours each; a touchscreen; the Sense HAT (now aboard the ISS); three compute modules; and cases for the Raspberry Pi 3 and the Zero (the former just won a Design Effectiveness Award from the DBA). And on top of that, we publish three magazines (The MagPi, Hello World, and HackSpace magazine) and a whole host of Project Books and Essentials Guides.

Chinese Raspberry Pi 1 Model B

RS Components limited-edition blue Raspberry Pi 1 Model B

Brazilian-market Raspberry Pi 3 Model B

Visible-light Camera Module v2

Learning about injection moulding the hard way

250 pages of content each month, every month

Essential reading

Forward the Foundation

Why does all this matter? Because we’re providing everyone, everywhere, with the chance to own a general-purpose programmable computer for the price of a cup of coffee; because we’re giving people access to tools to let them learn new skills, build businesses, and bring their ideas to life; and because when you buy a Raspberry Pi product, every penny of profit goes to support the Raspberry Pi Foundation in its mission to change the face of computing education.

We’ve had an amazing six years, and they’ve been amazing in large part because of the community that’s grown up alongside us. This weekend, more than 150 Raspberry Jams will take place around the world, comprising the Raspberry Jam Big Birthday Weekend.

Raspberry Pi Big Birthday Weekend 2018. GIF with confetti and bopping JAM balloons

If you want to know more about the Raspberry Pi community, go ahead and find your nearest Jam on our interactive map — maybe we’ll see you there.

The post Happy birthday to us! appeared first on Raspberry Pi.

Why Raspberry Pi isn’t vulnerable to Spectre or Meltdown

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/why-raspberry-pi-isnt-vulnerable-to-spectre-or-meltdown/

Over the last couple of days, there has been a lot of discussion about a pair of security vulnerabilities nicknamed Spectre and Meltdown. These affect all modern Intel processors, and (in the case of Spectre) many AMD processors and ARM cores. Spectre allows an attacker to bypass software checks to read data from arbitrary locations in the current address space; Meltdown allows an attacker to read arbitrary data from the operating system kernel’s address space (which should normally be inaccessible to user programs).

Both vulnerabilities exploit performance features (caching and speculative execution) common to many modern processors to leak data via a so-called side-channel attack. Happily, the Raspberry Pi isn’t susceptible to these vulnerabilities, because of the particular ARM cores that we use.

To help us understand why, here’s a little primer on some concepts in modern processor design. We’ll illustrate these concepts using simple programs in Python syntax like this one:

t = a+b
u = c+d
v = e+f
w = v+g
x = h+i
y = j+k

While the processor in your computer doesn’t execute Python directly, the statements here are simple enough that they roughly correspond to a single machine instruction. We’re going to gloss over some details (notably pipelining and register renaming) which are very important to processor designers, but which aren’t necessary to understand how Spectre and Meltdown work.

For a comprehensive description of processor design, and other aspects of modern computer architecture, you can’t do better than Hennessy and Patterson’s classic Computer Architecture: A Quantitative Approach.

What is a scalar processor?

The simplest sort of modern processor executes one instruction per cycle; we call this a scalar processor. Our example above will execute in six cycles on a scalar processor.

Examples of scalar processors include the Intel 486 and the ARM1176 core used in Raspberry Pi 1 and Raspberry Pi Zero.

What is a superscalar processor?

The obvious way to make a scalar processor (or indeed any processor) run faster is to increase its clock speed. However, we soon reach limits of how fast the logic gates inside the processor can be made to run; processor designers therefore quickly began to look for ways to do several things at once.

An in-order superscalar processor examines the incoming stream of instructions and tries execute more than one at once, in one of several “pipes”, subject to dependencies between the instructions. Dependencies are important: you might think that a two-way superscalar processor could just pair up (or dual-issue) the six instructions in our example like this:

t, u = a+b, c+d
v, w = e+f, v+g
x, y = h+i, j+k

But this doesn’t make sense: we have to compute v before we can compute w, so the third and fourth instructions can’t be executed at the same time. Our two-way superscalar processor won’t be able to find anything to pair with the third instruction, so our example will execute in four cycles:

t, u = a+b, c+d
v    = e+f                   # second pipe does nothing here
w, x = v+g, h+i
y    = j+k

Examples of superscalar processors include the Intel Pentium, and the ARM Cortex-A7 and Cortex-A53 cores used in Raspberry Pi 2 and Raspberry Pi 3 respectively. Raspberry Pi 3 has only a 33% higher clock speed than Raspberry Pi 2, but has roughly double the performance: the extra performance is partly a result of Cortex-A53’s ability to dual-issue a broader range of instructions than Cortex-A7.

What is an out-of-order processor?

Going back to our example, we can see that, although we have a dependency between v and w, we have other independent instructions later in the program that we could potentially have used to fill the empty pipe during the second cycle. An out-of-order superscalar processor has the ability to shuffle the order of incoming instructions (again subject to dependencies) in order to keep its pipelines busy.

An out-of-order processor might effectively swap the definitions of w and x in our example like this:

t = a+b
u = c+d
v = e+f
x = h+i
w = v+g
y = j+k

allowing it to execute in three cycles:

t, u = a+b, c+d
v, x = e+f, h+i
w, y = v+g, j+k

Examples of out-of-order processors include the Intel Pentium 2 (and most subsequent Intel and AMD x86 processors), and many recent ARM cores, including Cortex-A9, -A15, -A17, and -A57.

What is speculation?

Reordering sequential instructions is a powerful way to recover more instruction-level parallelism, but as processors become wider (able to triple- or quadruple-issue instructions) it becomes harder to keep all those pipes busy. Modern processors have therefore grown the ability to speculate. Speculative execution lets us issue instructions which might turn out not to be required (because they are branched over): this keeps a pipe busy, and if it turns out that the instruction isn’t executed, we can just throw the result away.

To demonstrate the benefits of speculation, let’s look at another example:

t = a+b
u = t+c
v = u+d
if v:
   w = e+f
   x = w+g
   y = x+h

Now we have dependencies from t to u to v, and from w to x to y, so a two-way out-of-order processor without speculation won’t ever be able to fill its second pipe. It spends three cycles computing t, u, and v, after which it knows whether the body of the if statement will execute, in which case it then spends three cycles computing w, x, and y. Assuming the if (a branch instruction) takes one cycle, our example takes either four cycles (if v turns out to be zero) or seven cycles (if v is non-zero).

Speculation effectively shuffles the program like this:

t = a+b
u = t+c
v = u+d
w_ = e+f
x_ = w_+g
y_ = x_+h
if v:
   w, x, y = w_, x_, y_

so we now have additional instruction level parallelism to keep our pipes busy:

t, w_ = a+b, e+f
u, x_ = t+c, w_+g
v, y_ = u+d, x_+h
if v:
   w, x, y = w_, x_, y_

Cycle counting becomes less well defined in speculative out-of-order processors, but the branch and conditional update of w, x, and y are (approximately) free, so our example executes in (approximately) three cycles.

What is a cache?

In the good old days*, the speed of processors was well matched with the speed of memory access. My BBC Micro, with its 2MHz 6502, could execute an instruction roughly every 2µs (microseconds), and had a memory cycle time of 0.25µs. Over the ensuing 35 years, processors have become very much faster, but memory only modestly so: a single Cortex-A53 in a Raspberry Pi 3 can execute an instruction roughly every 0.5ns (nanoseconds), but can take up to 100ns to access main memory.

At first glance, this sounds like a disaster: every time we access memory, we’ll end up waiting for 100ns to get the result back. In this case, this example:

a = mem[0]
b = mem[1]

would take 200ns.

In practice, programs tend to access memory in relatively predictable ways, exhibiting both temporal locality (if I access a location, I’m likely to access it again soon) and spatial locality (if I access a location, I’m likely to access a nearby location soon). Caching takes advantage of these properties to reduce the average cost of access to memory.

A cache is a small on-chip memory, close to the processor, which stores copies of the contents of recently used locations (and their neighbours), so that they are quickly available on subsequent accesses. With caching, the example above will execute in a little over 100ns:

a = mem[0]    # 100ns delay, copies mem[0:15] into cache
b = mem[1]    # mem[1] is in the cache

From the point of view of Spectre and Meltdown, the important point is that if you can time how long a memory access takes, you can determine whether the address you accessed was in the cache (short time) or not (long time).

What is a side channel?

From Wikipedia:

“… a side-channel attack is any attack based on information gained from the physical implementation of a cryptosystem, rather than brute force or theoretical weaknesses in the algorithms (compare cryptanalysis). For example, timing information, power consumption, electromagnetic leaks or even sound can provide an extra source of information, which can be exploited to break the system.”

Spectre and Meltdown are side-channel attacks which deduce the contents of a memory location which should not normally be accessible by using timing to observe whether another location is present in the cache.

Putting it all together

Now let’s look at how speculation and caching combine to permit the Meltdown attack. Consider the following example, which is a user program that sometimes reads from an illegal (kernel) address:

t = a+b
u = t+c
v = u+d
if v:
   w = kern_mem[address]   # if we get here crash
   x = w&0x100
   y = user_mem[x]

Now our out-of-order two-way superscalar processor shuffles the program like this:

t, w_ = a+b, kern_mem[address]
u, x_ = t+c, w_&0x100
v, y_ = u+d, user_mem[x_]

if v:
   # crash
   w, x, y = w_, x_, y_      # we never get here

Even though the processor always speculatively reads from the kernel address, it must defer the resulting fault until it knows that v was non-zero. On the face of it, this feels safe because either:

  • v is zero, so the result of the illegal read isn’t committed to w
  • v is non-zero, so the program crashes before the read is committed to w

However, suppose we flush our cache before executing the code, and arrange a, b, c, and d so that v is zero. Now, the speculative load in the third cycle:

v, y_ = u+d, user_mem[x_]

will read from either address 0x000 or address 0x100 depending on the eighth bit of the result of the illegal read. Because v is zero, the results of the speculative instructions will be discarded, and execution will continue. If we time a subsequent access to one of those addresses, we can determine which address is in the cache. Congratulations: you’ve just read a single bit from the kernel’s address space!

The real Meltdown exploit is more complex than this, but the principle is the same. Spectre uses a similar approach to subvert software array bounds checks.

Conclusion

Modern processors go to great lengths to preserve the abstraction that they are in-order scalar machines that access memory directly, while in fact using a host of techniques including caching, instruction reordering, and speculation to deliver much higher performance than a simple processor could hope to achieve. Meltdown and Spectre are examples of what happens when we reason about security in the context of that abstraction, and then encounter minor discrepancies between the abstraction and reality.

The lack of speculation in the ARM1176, Cortex-A7, and Cortex-A53 cores used in Raspberry Pi render us immune to attacks of the sort.

* days may not be that old, or that good

The post Why Raspberry Pi isn’t vulnerable to Spectre or Meltdown appeared first on Raspberry Pi.

New product! Raspberry Pi Zero W joins the family

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/raspberry-pi-zero-w-joins-family/

Today is Raspberry Pi’s fifth birthday: it’s five years since we launched the original Raspberry Pi, selling a hundred thousand units in the first day, and setting us on the road to a lifetime total (so far) of over twelve million units. To celebrate, we’re announcing a new product: meet Raspberry Pi Zero W, a new variant of Raspberry Pi Zero with wireless LAN and Bluetooth, priced at only $10.

Multum in parvo

So what’s the story?

In November 2015, we launched Raspberry Pi Zero, the diminutive $5 entry-level Raspberry Pi. This represented a fivefold reduction in cost over the original Model A: it was cheap enough that we could even stick it on the front cover of The MagPi, risking civil insurrection in newsagents throughout the land.

MagPi issue 40: causing trouble for WHSmith (credit: Adam Nicholls)

Over the ensuing fifteen months, Zero grew a camera connector and found its way into everything from miniature arcade cabinets to electric skateboards. Many of these use cases need wireless connectivity. The homebrew “People in Space” indicator in the lobby at Pi Towers is a typical example, with an official wireless dongle hanging off the single USB port: users often end up adding a USB hub to allow them to connect a keyboard, a mouse and a network adapter, and this hub can easily cost more than the Zero itself.

People in SPAAAAAACE

Zero W fixes this problem by integrating more functionality into the core product. It uses the same Cypress CYW43438 wireless chip as Raspberry Pi 3 Model B to provide 802.11n wireless LAN and Bluetooth 4.0 connectivity.

Pi Zero Announcement Video

Music: Orqestruh by SAFAKASH – https://soundcloud.com/safakash

To recap, here’s the full feature list for Zero W:

  • 1GHz, single-core CPU
  • 512MB RAM
  • Mini-HDMI port
  • Micro-USB On-The-Go port
  • Micro-USB power
  • HAT-compatible 40-pin header
  • Composite video and reset headers
  • CSI camera connector
  • 802.11n wireless LAN
  • Bluetooth 4.0

We imagine you’ll find all sorts of uses for Zero W. It makes a better general-purpose computer because you’re less likely to need a hub: if you’re using Bluetooth peripherals you might well end up with nothing at all plugged into the USB port. And of course it’s a great platform for experimenting with IoT applications.

Official case

To accompany Raspberry Pi Zero W, we’ve been working with our friends at Kinneir Dufort and T-Zero to create an official injection-moulded case. This shares the same design language as the official case for the Raspberry Pi 3, and features three interchangeable lids:

  • A blank one
  • One with an aperture to let you access the GPIOs
  • One with an aperture and mounting point for a camera

Three cases for the price of one

The case set also includes a short camera adapter flexi, and a set of rubber feet to make sure your cased Zero or Zero W doesn’t slide off the desk.

New distributors

You may have noticed that we’ve added several new Zero distributors recently: ModMyPi in the UK, pi3g in Germany, Samm Teknoloji in Turkey, Kubii in France, Spain, Italy and Portugal, and Kiwi Electronics in the Netherlands, Belgium and Luxembourg.

Raspberry Pi Zero W is available from all Zero distributors today, with the exception of Micro Center, who should have stock in stores by the end of this week. Check the icons below to find the stockist that’s best for you!

UK, Ireland

PimoroniThe Pi Hut

United States

AdafruitCanakitMicrocenter

Canada

Canakit

Germany, Austria, Switzerland

France, Spain, Italy, Portugal

Netherlands, Belgium, Luxembourg

Turkey

Global

PimoroniThe Pi HutAdafruit
Canakit

The post New product! Raspberry Pi Zero W joins the family appeared first on Raspberry Pi.

PIXEL for PC and Mac

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/pixel-pc-mac/

Our vision in establishing the Raspberry Pi Foundation was that everyone should be able to afford their own programmable general-purpose computer. The intention has always been that the Raspberry Pi should be a full-featured desktop computer at a $35 price point. In support of this, and in parallel with our hardware development efforts, we’ve made substantial investments in our software stack. These culminated in the launch of PIXEL in September 2016.

PIXEL represents our best guess as to what the majority of users are looking for in a desktop environment: a clean, modern user interface; a curated suite of productivity software and programming tools, both free and proprietary; and the Chromium web browser with useful plugins, including Adobe Flash, preinstalled. And all of this is built on top of Debian, providing instant access to thousands of free applications.

Put simply, it’s the GNU/Linux we would want to use.

The PIXEL desktop on Raspberry Pi

Back in the summer, we asked ourselves one simple question: if we like PIXEL so much, why ask people to buy Raspberry Pi hardware in order to run it? There is a massive installed base of PC and Mac hardware out there, which can run x86 Debian just fine. Could we do something for the owners of those machines?

So, after three months of hard work from Simon and Serge, we have a Christmas treat for you: an experimental version of Debian+PIXEL for x86 platforms. Simply download the image, burn it onto a DVD or flash it onto a USB stick, and boot straight into the familiar PIXEL desktop environment on your PC or Mac. Or go out and buy this month’s issue of The MagPi magazine, in stores tomorrow, which has this rather stylish bootable DVD on the cover.

Our first ever covermount

You’ll find all the applications you’re used to, with the exception of Minecraft and Wolfram Mathematica (we don’t have a licence to put those on any machine that’s not a Raspberry Pi). Because we’re using the venerable i386 architecture variant it should run even on vintage machines like my ThinkPad X40, provided they have at least 512MB of RAM.

The finest laptop ever made, made finer

Why do we think this is worth doing? Two reasons:

  • A school can now run PIXEL on its existing installed base of PCs, just as a student can run PIXEL on her Raspberry Pi at home. She can move back and forth between her computing class or after-school club and home, using exactly the same productivity software and programming tools, in exactly the same desktop environment. There is no learning curve, and no need to tweak her schoolwork to run on two subtly different operating systems.
  • And bringing PIXEL to the PC and Mac keeps us honest. We don’t just want to create the best desktop environment for the Raspberry Pi: we want to create the best desktop environment, period. We know we’re not there yet, but by running PIXEL alongside Windows, Mac OS, and the established desktop GNU/Linux distros, we can more easily see where our weak points are, and work to fix them.

Remember that this is a prototype rather then a final release version. Due to the wide variety of PC and Mac hardware out there, there are likely to be minor issues on some hardware configurations. If we decide that this is something we want to commit to in the long run, we will do our best to address these as they come up. You can help us here – please let us know how you get on in the comments below!

Instructions

Download the image, and either burn it to a DVD or write it to a USB stick. For the latter, we recommend Etcher.

Etcher from resin.io

Insert the DVD or USB stick into your PC or Mac, and turn it on. On a PC, you will generally need to enable booting from optical drive or USB stick in the BIOS, and you will have to ensure that the optical drive or USB stick is ahead of all other drives in the boot order. On a Mac, you’ll need to hold down C during boot*.

If you’ve done that correctly, you will be greeted by a boot screen.

Boot screen

Here you can hit escape to access the boot menu, or do nothing to boot through to the desktop.

Spot the difference: the PIXEL desktop on a PC

* We are aware of an issue on some modern Macs (including, annoyingly, mine – but not Liz’s), where the machine fails to identify the image as bootable. We’ll release an updated image once we’ve got to the bottom of the issue.

Persistence

If you are running from DVD, any files you create, or modifications you make to the system, will of course be lost when you power off the machine. If you are running from a USB stick, the system will by default use any spare space on the device to create a persistence partition, which allows files to persist between sessions. The boot menu provides options to run with or without persistence, or to erase any persistence partition that has been created, allowing you to roll back to a clean install at any time.

Boot menu

Disclaimer

One of the great benefits of the Raspberry Pi is that it is a low-consequence environment for messing about: if you trash your SD card you can just flash another one. This is not always true of your PC or Mac. Consider backing up your system before trying this image.

Raspberry Pi can accept no liability for any loss of data or damage to computer systems from using the image.

The post PIXEL for PC and Mac appeared first on Raspberry Pi.

SUSE Linux Enterprise Server for Raspberry Pi

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/suse-linux-enterprise-server-for-raspberry-pi/

Raspberry Pi 3, with its quad-core ARM Cortex-A53 processor, is our first 64-bit product, supporting ARM’s A64 instruction set and the ARMv8-A architecture. However, we’ve not yet taken the opportunity to ship a 64-bit operating system: our Raspbian images are designed to run on every Raspberry Pi, including the 32-bit ARMv6 Raspberry Pi 1 and Raspberry Pi Zero, and the 32-bit ARMv7 Raspberry Pi 2. We use an ARMv6 userland with selected ARMv7 fast paths enabled at run time.

There’s been some great work done in the community. Thanks to some heroic work from forum user Electron752, we have a working 64-bit kernel, and both Ubuntu and Fedora userlands have been run successfully on top of this.

SUSE and ARM distributed these natty cased Raspberry Pi units at last week's SUSEcon

SUSE and ARM distributed these natty cased Raspberry Pi units at last week’s SUSEcon

Which brings us to last week’s announcement: that SUSE have released a version of their Linux Enterprise Server product that supports Raspberry Pi 3.

Why is this important? Because for the first time we have an official 64-bit operating system release from a major vendor, with support for our onboard wireless networking and Bluetooth. SUSE have kindly upstreamed the patches that they needed to make this work, so hopefully official support from other vendors won’t be far behind.

You can download an image here. Give it a spin and let us know what you think.

The post SUSE Linux Enterprise Server for Raspberry Pi appeared first on Raspberry Pi.

The Compute Module – now in an NEC display near you

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/compute-module-nec-display-near-you/

Back in April 2014, we launched the Compute Module to provide hardware developers with a way to incorporate Raspberry Pi technology into their own products. Since then we’ve seen it used to build home media players, industrial control systems, and everything in between.

Earlier this week, NEC announced that they would be adding Compute Module support to their next-generation large-format displays, starting with 40″, 48″ and 55″ models in January 2017 and eventually scaling all the way up to a monstrous 98″ (!!) by the end of the year. These are commercial-grade displays designed for use in brightly-lit public spaces such as schools, offices, shops and railway stations.

Believe it or not these are the small ones

Believe it or not, these are the small ones.

NEC have already lined up a range of software partners in retail, airport information systems, education and corporate to provide presentation and signage software which runs on the Compute Module platform. You’ll be seeing these roll out in a lot of locations that you visit frequently.

Each display has an internal bay which accepts an adapter board loaded with either the existing Compute Module, or the upcoming Compute Module 3, which incorporates the BCM2837 application processor and 1GB of LPDDR2 memory found on the Raspberry Pi 3 Model B. We’re expecting to do a wider release of Compute Module 3 to everybody around the end of the year.

The Compute Module in situ

The Compute Module in situ

We’ve been working on this project with NEC for over a year now, and are very excited that it’s finally seeing the light of day. It’s an incredible vote of confidence in the Raspberry Pi Compute Module platform from a blue-chip hardware vendor, and will hopefully be the first of many.

Now, here’s some guy to tell you more about what’s going on behind the screens you walk past every day on your commute.

‘The Power to Surprise’ live stream at Display Trends Forum 2016 – NEC Teams Up With Raspberry Pi

NEC Display Solutions today announced that it will be sharing an open platform modular approach with Raspberry Pi, enabling a seamless integration of Raspberry Pi’s devices with NEC’s displays. NEC’s leading position in offering the widest product range of display solutions matches perfectly with the Raspberry Pi, the organisation responsible for developing the award-winning range of low-cost, high-performance computers.

The post The Compute Module – now in an NEC display near you appeared first on Raspberry Pi.

Ten millionth Raspberry Pi, and a new kit

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/ten-millionth-raspberry-pi-new-kit/

When we started Raspberry Pi, we had a simple goal: to increase the number of people applying to study Computer Science at Cambridge. By putting cheap, programmable computers in the hands of the right young people, we hoped that we might revive some of the sense of excitement about computing that we had back in the 1980s with our Sinclair Spectrums, BBC Micros and Commodore 64s.

At the time, we thought our lifetime volumes might amount to ten thousand units – if we were lucky. There was was no expectation that adults would use Raspberry Pi, no expectation of commercial success, and certainly no expectation that four years later we would be manufacturing tens of thousands of units a day in the UK, and exporting Raspberry Pi all over the world.

Less than ten million Raspberry Pis

The first two thousand Raspberry Pis. Each Pi in this pallet now has 5000 siblings.

With this in mind, you can imagine how strange it feels to be able to announce that over the last four and a half years we’ve sold a grand total of ten million Raspberry Pis. Thanks to you, we’ve beaten our wildest dreams by three orders of magnitude, and we’re only just getting started. Every time you buy a Raspberry Pi, you help fund both our ongoing engineering work, and our educational outreach programs, including Code Club and Picademy.

Very early on, we decided that we would offer the bare-bones Raspberry Pi board without accessories: that way, cost-conscious customers get the lowest possible price, provided they can beg or borrow USB peripherals, a power supply and an SD card. Over the years, Raspberry Pi distributors have built on this, producing some fantastic bundles for people who would rather get everything they need from a single source.

To celebrate the ten millionth Raspberry Pi, for the first time we’ve put together our own idea of what the perfect bundle would look like, creating the official Raspberry Pi Starter Kit.

The starter kit, unboxed and ready to go

The starter kit, unboxed and ready to go

Inside the minimalist white box (like the official case, another beautiful Kinneir Dufort design), you’ll find:

  • A Raspberry Pi 3 Model B
  • An 8GB NOOBS SD card
  • An official case
  • An official 2.5A multi-region power supply
  • An official 1m HDMI cable
  • An optical mouse and a keyboard with high-quality scissor-switch action
  • A copy of Adventures in Raspberry Pi Foundation Edition

This is an unashamedly premium product: the latest Raspberry Pi, official accessories, the best USB peripherals we could find, and a copy of the highest-rated Raspberry Pi book. The kit is available to order online in the UK from our partners element14 and RS Components, priced at £99+VAT, and will be coming to the rest of the world, and to your favourite reseller, over the next few weeks.

The post Ten millionth Raspberry Pi, and a new kit appeared first on Raspberry Pi.

Internet of Voice Challenge with Amazon and hackster.io

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/internet-voice-challenge/

Many of you have been using the Raspberry Pi as a platform for internet of things (IoT) hacking. With wired and wireless communication on board, Raspberry Pi 3 is a great platform for connecting the network, and network-accessible services, to the real world.

Where we're going, we don't need roads

Where we’re going, we don’t need roads

Voice recognition can add a whole new dimension to IoT projects. We recently showed you how to connect your Raspberry Pi to Amazon’s Alexa Voice Service to build your very own homebrew clone of the Echo voice appliance. Now, in partnership with Amazon and hackster.io, we’re giving you a chance to win Echo kit and Amazon gift vouchers by developing your own “internet of voice” projects with the Raspberry Pi.

I've still got the greatest enthusiasm and confidence in the mission

I’ve still got the greatest enthusiasm and confidence in the mission

Prizes will be awarded in two categories: best use of the Alexa Skills Kit as an integral part of the project, and best use of the Alexa Voice Service. The top prizes in each category are worth $1900, and the contest runs until the start of August. Head to hackster.io for more information, and good luck!

The post Internet of Voice Challenge with Amazon and hackster.io appeared first on Raspberry Pi.

Zero grows a camera connector

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/zero-grows-camera-connector/

When we launched Raspberry Pi Zero last November, it’s fair to say we were blindsided by the level of demand. We immediately sold every copy of MagPi issue 40 and every Zero in stock at our distributors; and every time a new batch of Zeros came through from the factory they’d sell out in minutes. To complicate matters, Zero then had to compete for factory space with Raspberry Pi 3, which was ramping for launch at the end of February.

Happily, Mike was able to take advantage of the resulting production hiatus to add the most frequently demanded “missing” feature to Zero: a camera connector. Through dumb luck, the same fine-pitch FPC connector that we use on the Compute Module Development Kit just fits onto the right hand side of the board, as you can see here.

Caption

Raspberry Pi Zero, now with added camera goodness

To connect the camera to the Zero, we offer a custom six-inch adapter cable. This converts from the fine-pitch connector format to the coarser pitch used by the camera board. Liz has a great picture of Mooncake, the official Raspberry Pi cat, attempting to eat the camera cable. She won’t let me use it in this post so that you aren’t distracted from the pictures of the new Zero itself. I’ve a feeling she’ll be tweeting it later today.

Cable

FPC adapter cable

To celebrate our having designed the perfect high altitude ballooning (HAB) controller, Dave Akerman will be launching a Zero, a camera and the new GPS+RTTY+LoRa radio board that he designed with Anthony Stirk, from a field in the Welsh Marches later today. You can follow along here and here, and in the meantime marvel at the Jony Ive-quality aesthetics of today’s payload.

Give me blue styrofoam and a place to stand...

Give me blue styrofoam and a place to stand…

You can buy Raspberry Pi Zero in Europe from our friends at The Pi Hut and Pimoroni, and in the US from Adafruit and in-store at your local branch of Micro Center. There are roughly 30,000 new Zeros out there today, and we’ll be making thousands more each day until demand is met.

The post Zero grows a camera connector appeared first on Raspberry Pi.

New 8-megapixel camera board on sale at $25

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/new-8-megapixel-camera-board-sale-25/

The 5-megapixel visible-light camera board was our first official accessory back in 2013, and it remains one of your favourite add-ons. They’ve found their way into a bunch of fun projects, including telescopes, kites, science lessons and of course the Naturebytes camera trap. It was soon joined by the Pi NoIR infrared-sensitive version, which not only let you see in the dark, but also opened the door to hyperspectral imaging hacks.

As many of you know, the OmniVision OV5647 sensor used in both boards was end-of-lifed at the end of 2014. Our partners both bought up large stockpiles, but these are now almost completely depleted, so we needed to do something new. Fortunately, we’d already struck up conversation with Sony’s image sensor division, and so in the nick of time we’re able to announce the immediate availability of both visible-light and infrared cameras based on the Sony IMX219 8-megapixel sensor, at the same low price of $25. They’re available today from our partners RS Components and element14, and should make their way to your favourite reseller soon.

Visible light camera v2

The visible light camera…

...and its infrared cousin

…and its infrared cousin

In our testing, IMX219 has proven to be a fantastic choice. You can read all the gory details about IMX219 and the Exmor R back-illuminated sensor architecture on Sony’s website, but suffice to say this is more than just a resolution upgrade: it’s a leap forward in image quality, colour fidelity and low-light performance.

VideoCore IV includes a sophisticated image sensor pipeline (ISP). This converts “raw” Bayer-format RGB input images from the sensor into YUV-format output images, while correcting for sensor and module artefacts such as thermal and shot noise, defective pixels, lens shading and image distortion. Tuning the ISP to work with a particular sensor is a time-consuming, specialist activity: there are only a handful of people with the necessary skills, and we’re very lucky that Naush Patuck, formerly of Broadcom’s imaging team, volunteered to take this on for IMX219.

Naush says:

Regarding the tuning process, I guess you could say the bulk of the effort went into the lens shading and AWB tuning. Apart from the fixed shading correction, our auto lens shading algorithm takes care of module to module manufacturing variations. AWB is tricky because we must ensure correct results over a large section of the colour temperature curve; in the case of the IMX219, we used images illuminated by light sources from 1800K [very “cool” reddish light] all the way up to 16000K [very “hot” bluish light].

The goal of auto white balance (AWB) is to recover the “true” colours in a scene regardless of the colour temperature of the light illuminating it: filming a white object should result in white pixels in sunlight, or under LED, fluorescent or incandescent lights. You can see from these pairs of before and after images that Naush’s tune does a great job under very challenging conditions.

AWB with high colour temperature

AWB at higher colour temperature

AWB at lower colour temperature

AWB at lower colour temperature

As always, we’re indebted to a host of people for their help getting these products out of the door. Dave Stevenson and James Hughes (hope you and Elaine are having a great honeymoon, James!) wrote most of our camera platform code. Mike Stimson designed the board (his second Raspberry Pi product after Zero). Phil Holden, Shinichi Goseki, Qiang Li and many others at Sony went out of their way to help us get access to the information Naush needed to tune the ISP.

We’re really happy with the way the new camera board has turned out, and we can’t wait to see what you do with it. Head over to RS Components or element14 to pick one up today.

The post New 8-megapixel camera board on sale at $25 appeared first on Raspberry Pi.

Scratch performance – feel the speed!

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/scratch-performance-raspberry-pi/

The Scratch programming language, developed at MIT, has become the cornerstone of computing education at the primary level. Running the Scratch environment well was an early goal for Raspberry Pi. Since early 2013 we’ve been working with Tim Rowledge, Smalltalk hacker extraordinaire. Tim has been beavering away, improving the Scratch codebase and porting it to newer versions of the Squeak virtual machine. Ben Avison chipped in with ARM-optimised versions of Squeak’s graphics operations, and of course we did our bit by releasing two new generations of the Raspberry Pi hardware.

We thought you’d enjoy these two videos. The first shows Andrew Oliver’s Scratch implementation of Pacman running on an Intel Core i5 laptop with “standard” Scratch 1.4. (Yes, that Andrew Oliver. Thanks Andrew!) The second shows the same code running on a Raspberry Pi 3 with Tim’s optimised Scratch. The Raspberry Pi version is roughly twice as fast.

Pacman running on a Macbook i5 under MIT Scratch

A demonstration of how much slower standard Scratch can be than the optimised NuScratch that’s available for Raspberry Pi

PacMan running on Pi 3 under NuScratch

This is “PacMan running on Pi 3 under NuScratch” by raspberrypi on Vimeo, the home for high quality videos and the people who love them.

This is a great example of the sort of attention-to-detail work that we like to focus on, and that can make the difference between a mediocre user experience and the desktop-equivalent experience that we aspire to for Raspberry Pi 3. We think it’s as important to work as hard on improving and incrementing software as it is to do the same with the hardware it runs on. We’ve done similar work with Kodi and Epiphany, and you can expect a lot more of this from us over the next couple of years.

The post Scratch performance – feel the speed! appeared first on Raspberry Pi.

Build a smart doorbell with Windows 10

Post Syndicated from Eben Upton original https://www.raspberrypi.org/blog/build-smart-doorbell-windows-10/

When someone rings my doorbell at home, I walk to the door to find out who’s there. For those of you with larger homes, I know that it can be challenging to get there in time to release the hounds.
Architecture diagramArchitecture diagram
With you in mind, Kishore Gaddam has put together a tutorial showing how you can use Windows 10 and Visual Studio to build a doorbell that takes your visitor’s picture, uploads it to Azure, and sends a notification to your cellphone. Integration with your smart kennel door is left as an exercise for the reader.
Head over to hackster.io for all the gory details.
The post Build a smart doorbell with Windows 10 appeared first on Raspberry Pi.