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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Setup a Raspberry Pi as an IoT Device Part 2

100% helpful (1/1)



Step 4: Connect Peripherals and Initial Configuration


Connect Peripherals


Now that we have a working microsdhc flash card with the Raspbian OS, we want to insert it into the Pi, as well as connect our other peripherals and power.


  1. Remove the microsdhc card from the adapter.

    03-mlp-card-plus-adapter (1).jpg


  2. With the power supply NOT connected, insert the microsdhc card into the Pi.

    • Note that it may help to turn the Pi over.



  3. With the power supply NOT connected to a wall-socket, connect the power, monitor, USB keyboard, and USB mouse.

    00-mlp-pi (1).jpg



  4. Plug-in the power-supply to a wall-socket and wait for the Pi to boot.



Pi Initial Configuration


The Raspbian OS needs some initial configuration to set things such as your location and to connect to a WiFi network.


  1. Click Next on the initial Raspbian start pop-up.

  2. Set your Country, Language, TimeZone, Use English language (if applicable), and Use US keyboard (if applicable), then click Next.


    1. 23-mlp-set-country.png


  3. Enter and Confirm a new password, then click Next.


  4. If applicable, check the This screen shows a black border around the desktop checkbox, and click Next.



  5. Select an appropriate WiFi network, and click Next.

  6. Enter the WiFi password, and click Next.



  7. On the Update Software screen, it is recommended to click Skip.

    • If you have a microsdhc card with 16GB or more, then you may click Next to peform an OS update.

    • Note that this process may be time-intensive... 30+ minutes.



  8. If you performed an OS update, and it has completed with a System is up to date pop-up, click OK.



  9. When the Setup is complete, click Restart.

    • After the reboot, you will be automatically re-logged into Raspbian.




Step 5: Install EMS


Now that the Pi is fully setup, you want to download the Edge MicroServer (EMS) onto the Pi.

  1. On the Raspberry Pi, open a web browser and navigate to this guide, then download
  2. Click the download's options drop-down, and select Show in folder.





  3. Right-click on the .zip file and select Extract Here.





  4. Navigate into the newly-extracted /microserver folder.



The primary executables which enable the EMS functionality are the following:

File NameDescription
wsemsAn executable file that runs the Edge MicroServer.
luascriptresourceThe Lua utility that is used to run Lua scripts, configure remote things, and integrate with the host system.



Create Additional Directories


New folders may be added to the /microserver directory for various purposes.

Some of these will be utilized within this guide, while others may be utilized in future guides using the EMS.


  1. In the /microserver folder, create a /logs directory.

  2. Create a /other directory.

  3. Create a /staging directory.

  4. Create a /tw directory.

  5. Create a /updates directory.



Create Test Files


It can also be helpful during testing to have some small files in these folders to further demonstrate connectivity.


As these files were custom-created for the guide, seeing them within ThingWorx Foundation ensures that the connection between Foundation and the EMS is real and current.


  1. In the /tw directory, create a text file named tw_test_01.txt.

  2. In the /other directory, create a text file named other_test_01.txt.




Click here to view Part 3 of this guide.

Version history
Last update:
‎Nov 04, 2022 02:06 PM
Updated by:
Labels (1)