If you want to build your own gadgets using the Raspberry Pi but don’t have the kit or even a Pi, there could soon be another way to get started.
Microsoft is building an online Raspberry Pi simulator that allows users to write code to control emulated hardware, and that currently lets users interact with an LED and collect data from a sensor.
The simulator loads with a sample program for collecting the ‘temperature’ from the sensor and displaying it in the command line. Microsoft has a tutorial for how to run this code, which requires users to sign in to Microsoft’s Azure IoT Hub and select the free tier service option. The sample application is fully compatible with being run on a real Pi, and the simulator seems to be designed to allow people to test code for controlling hardware using the Pi, before transferring it to a real device.
At present, the simulator is in ‘preview’ and is quite rudimentary, which means the embedded image of the Pi is static and the simulator is limited to interacting with the sensor and the LED. However, Microsoft is planning to emulate new devices and sensors, according to Xin Shi, a Microsoft employee based in Shanghai.
While he says there is currently no timeline for Microsoft expanding the simulator, he adds that others are free to do so, as the simulator’s code is open-source.
Microsoft are not the first to simulate Pi-controlled hardware, the Raspberry Pi Foundation worked with US startup Trinket to create a web-based emulator for Sense HAT, an add-on board that is bundled with various sensors, a joystick and an LED matrix that the Pi can interact with.
Similar to the Microsoft simulator, the Sense HAT emulator allows users to write Python code to interact with the add-on board, however, the emulator gives users a greater range of sensors to interact with, as well control over a simulated version of the board’s LED matrix.
The Raspberry Pi has been hugely successful since its 2012 launch as a low-cost board aimed at helping teach kids to code, with more than 14 million Pi boards sold.
Read more about the Raspberry Pi
- Raspberry Pi: The smart person’s guide
- Raspberry Pi 3: The inside story from the new $35 computer’s creator
- Raspberry Pi in 2017: New boards, new OSes and more
- Choosing a Raspberry Pi OS? Here’s the definitive list
- New Raspberry Pi board: Compute Module 3 means you’ll see Pi in more products
- Raspberry Pi and Docker: Tiny $35 computer gets major new release of HypriotOS (ZDNet)
- Turn any hard drive into networked storage with Raspberry Pi (CNET)
Subscribe to the Innovation Insider Newsletter
Catch up on the latest tech innovations that are changing the world, including IoT, 5G, the latest about phones, security, smart cities, AI, robotics, and more. Delivered Tuesdays and Fridays