Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Setup a Raspberry Pi as an IoT Device Part 1

100% helpful (1/1)


Connect a Raspberry Pi to ThingWorx using the Edge MicroServer (EMS).




This project will utilize the Edge MicroServer (EMS) to connect ThingWorx Foundation to a Raspberry Pi.




  • Set up Raspberry Pi
  • Install, configure, and launch the Edge MicroServer (EMS)
  • Connect a remote device to ThingWorx Foundation


NOTE:  The estimated time to complete all parts of this guide is 60 minutes.



Step 1: Introduction


A Raspberry Pi is a small, single-board computer that utilizes an ARM processor and typically runs a variant of Linux.


Due to its small size, relatively affordable cost, and ability to run a full operating system, the Pi is a near-ideal device to utilize as a Proof-of-Concept (PoC) IoT Edge device.


In addition, there is a version of the ThingWorx Edge MicroServer (EMS) built to work on ARM processors. Therefore, this guide will explore getting the EMS running on a Raspberry Pi to connect to ThingWorx Foundation.





As stated in the Overview, you may purchase a Pi directly from the Raspberry Pi web site or from a distribution partner such as Digi-Key or RS.


You will also need an SD card (8+GB... 16+GB recommended) with the Raspbian operating system installed... though this guide will instruct you on installing the Raspbian OS on a microsdhc flash card if you prefer to purchase an SD card separately.


You may alternately wish to purchase a "Pi Canakit". Canakits, depending on the version, typically include a Pi, SD card with a version of Raspbian pre-installed, and various other items like sensors, a case, an HDMI cable, and other accessories.


To make this guide as straight-forward as possible, we'll assume a monitor, USB keyboard, USB mouse, and WiFi connectivity to interact with the Pi.


Note that the Pi has an HDMI port, so you may also need an HDMI-to-DVI convertor or similar if your monitor doesn't natively support HDMI.



Step 2: Format MicroSDHC Card


The microSDHC flash card which the Pi accepts may (or may not) come pre-installed with the Raspbian OS. If Raspbian is pre-installed and working, you may skip this step.


However, these flash cards are susceptible to corruption, especially if proper static-control guards are not followed or if the Pi is powered-down without going through a proper shutdown procedure.


As such, the steps immediately below will assume that you are installing (or re-installing) Raspbian on your microSDHC card.


Depending on your PC's ports, you may also require a microSDHC adapter to insert the flash card into your computer.


  1. Locate your microSDHC card.

    • Remember that 8+GB is mandatory, but 16+GB is recommended to ensure that the Pi has enough swap-space.


  2. Locate your flash card adapter.

    • Note that you may have a different type of adapter. Simply ensure that your PC can recognize the microSDHC card.



  3. Insert the microSDHC card into the adapter.



  4. Insert the adapter-plus-microsdhc card into your PC.



  5. Assuming a Windows PC and either a pre-installed or corrupted flash card, you will receive a pop-up stating that it needs to be formatted prior to use; click Format disk.



  6. On the following Format SDHC Card pop-up, click Start.



  7. On the following Format Confirmation pop-up, click OK.



  8. On the following Format Complete pop-up, click OK.



  9. On the previous Format pop-up which is still open, click Close.

  10. You now have a formatted microSDHC card which Windows can recognize.




Step 3: Flash MicroSDHC Card


Now that the flash card is accessible to Windows, you want to install the Raspbian OS on it.


Once again, this step assumes that you are installing (or re-installing) the Raspbian OS.


If your microSDHC card came pre-installed with Raspbian, then you may skip this step.


  1. Download the Raspbian OS .zip file.

  2. Navigate to the download location and locate the Raspbian .zip file.



3. Right-click on the file and select Extract All....



4. On the Extract Pop-up, click Extract.



5. Download the balenaEtcher "flasher" software.

6. Navigate to the download location and locate the balenaEtcher .exe file.


7. Double-click on the balenaEtcher .exe to begin the installation process.



8. On the balenaEtcher installer pop-up, click I Agree.

  • After the installation completes, balenaEtcher will automatically open.



9. Click Select image and navigate to the previously-extracted Raspbian OS .img file.



10. Select the .img file and click Open.

  • Assuming the only microSDHC card currently inserted into your PC is the one for the Pi, then the SD SCSI Disk Device will be pre-selected; otherwise, choose the correct flash disk.


11. Click Flash!.

  • Accept allowing the etcher to make changes to your computer.



12. Wait for balenaEtcher to complete the flashing process; this may take ~5-10 minutes.



13. Remove the microSDHC card and adapter from your PC.



Click here to view Part 2 of this guide.

Version history
Last update:
‎Mar 07, 2023 02:50 PM
Updated by:
Labels (1)