A Virtual Raspberry Pi for Azure
![](https://i0.wp.com/davidjmcclelland.com/wp-content/uploads/2023/02/image-5-e1677104270585.png?resize=64%2C64&ssl=1)
![https://davidjmcclelland.com/wp-content/uploads/2023/02/image-6.png](https://i0.wp.com/davidjmcclelland.com/wp-content/uploads/2023/02/image-6.png?resize=62%2C62&ssl=1)
I am trying out Azure IoT Hub – once the hub resource is created there should be a way to add a mock device to see some data, but it doesn’t appear to offer one. In fact, if you follow the steps in the learn.microsoft resource it skips adding a device and assumes you somehow already have some.
![](https://i0.wp.com/davidjmcclelland.com/wp-content/uploads/2023/02/image-2.png?resize=705%2C249&ssl=1)
Between this missing detail and some very inconsistent support for using IoT Hub in VSCode, I started getting frustrated with the entire environment. But there has to be a way! Dig deep! Google!
![](https://i0.wp.com/davidjmcclelland.com/wp-content/uploads/2023/02/image-3.png?resize=256%2C208&ssl=1)
Thanks Google. I found a tutorial describing how to register a virtual Raspberry Pi to IoT Hub. This is an impressive resource, consisting of a web app that executes an editable NodeJS script that mimics a particular configuration of a Raspberry Pi, including an LED that lights up.
I was able to follow the steps in the tutorial and get the LED to blink. This meant that messages were successfully sent to and received by my IoT Hub. What didn’t happen was the appearance of a device registered to IoT Hub. It’s not the same thing.
Be careful to limit how long you let the “imitation Raspberry” run – it will load up your message quota pretty quickly if you are in a lower tier.
![](https://i0.wp.com/davidjmcclelland.com/wp-content/uploads/2023/02/image-4.png?resize=808%2C595&ssl=1)
Note that one connected device is shown during the time it was communicating with IoT Hub. But it is not registered, and is not displayed in the VSCode UI for IoT Hub.