ionutmnere / ElectrotechWorkshop

0 stars 0 forks source link

Prepare Development Environment #2

Closed ionutmnere closed 6 years ago

ionutmnere commented 7 years ago

Prepare a step bu step guideline for tools and libraries needed for a dummy project to compile. Provide the dummy project to the students one week before the workshop.

torokpeter commented 6 years ago
  1. Access https://www.visualstudio.com/vs/older-downloads/ and press "Download" at the "Visual Studio 2015 and other Products" entry at the bottom of the screen.
  2. A personal Microsoft account will be asked from the user, if you don't have one, please create one by pressing the "Create Microsoft account" button at the bottom of the registration fields.
  3. After authentication, download "Visual Studio Community 2015 with Update 3".
  4. Default installation
  5. Download Arduino IDE for Visual Studio (vMicro) from https://marketplace.visualstudio.com/items?itemName=VisualMicro.ArduinoIDEforVisualStudio
  6. Start the installer, and with the default settings, press "Install"
  7. Starting Visual Studio 2015. You can chose to either access with your account or press the "Not now, maybe later" option in the view. A window with the title "Configure Ide Locations" should appear. Press the"Download/Install Ide" button in the bottom of the view.
  8. The arduino official site should open, press Windows Installer, to download the Arduino IDE needed. On the new image press "Just Download" to download for free.
  9. Run the installer and proceede to install with default settings. (if needed, accept the propted driver installations as well)
  10. Press "OK" with the three empty fields. Afterwards in the top left corner a field with the text "Visual Micro (No IDE)" should be available.

If all steps are completed, we can move to the Arduino Studio that we recently downloaded (we will come back to Visual Studio 2015 in a bit)

  1. Open Arduino Studio, go to "File"->"Preferences" (Ctrl+Comma).
  2. On the bottom of the view at "Additional Board Manager URLs:" fill with "http://arduino.esp8266.com/stable/package_esp8266com_index.json". Press "OK"
  3. Go to "Tools"->"Board: ..." -> "Boards Manager...".
  4. Type "esp8266" in the search bar and click on "esp8266 by ESP8266 Community".
  5. Select version "2.3.0" and press "Install".

Wait until installation is finished. After that go back to Visual Studio 2015.

  1. Click on the dropdown menu with the current selected value of "Visual Micro (No IDE)". Select "".
  2. In the field with the title " * Enter the ide folder location" click on the dropdown menu and select the shown location (should be "C:\Program Files (x86)\Arduino"). The first dropdown should also be "Arduino 1.6/1.8".
  3. Press OK. The dropdown should be updated in the top left corner. Select "Arduino 1.6/1.8".
  4. In the second dropdown you should have "WeMos D1 R2 & mini" under "ESP8266 Modules v2.3.0".

If step 13 will not contain "ESP8266 Modules v2.3.0" the following should be done:

13.1. Select "Find or Install a board ..." at the bottom of the second dropdown. 13.2. Press "Rescan" button at the top of the screen. 13.3. Now the "ESP8266 Modules v2.3.0" should be shown in the second dropdown.

To test if all the steps have been executed correctly:

  1. Go to "File" -> "New Project".
  2. Select "Visual C++" -> "Visual Micro" -> "Arduino Project".
  3. Set name to "TestProject" and press "OK".
  4. Build the newly created project using "Build" -> "Build Solution". (NOTE: If asked for a license, press the "Cancel" button)

If the build was successful, all steps until here have been correctly executed.

ionutmnere commented 6 years ago

13.4. Arduino studio --> Sketch --> "Include library" --> "Manage library" --> type in the search bar: "ArduinoJson" and install the version 5.11.2. 13.5 Install "PubSubClient" library version 2.6.0 in the same way as 13.4 13.6 Locate the PubSubClient.h include file of the previously installed library. Find the MQTT_MAX_PACKET_SIZE and change it from 128 to 512 value

from chapter 14 --> back to Visual Studio