[[_TOC_]]

# Introduction

In this module you will find an introduction the required tooling and hardware you will need for this course.

# Setup

## Linux virtual image

+ Linux Virtual image for programming environment is available at: 
	+  [www.fhict.nl/docent/downloads/TI/S3/](https://www.fhict.nl/docent/downloads/TI/S3/) (please use the kathara image)  This image includes visual studio code setup and kathare (used for networking challenges)
+ If you use your own Linux installation you can use (at your own risk!) the script for the required tooling: [link](https://git.fhict.nl/technology/t-sem2-code/blob/master/es2/scripts/install-tooling.sh).
+ You can download VMware via [FHICT Studentenplein](https://portal.fhict.nl/Studentenplein/SitePages/Home.aspx) via link `VMware Store`. 

# Information-resources

## Development environment

For editing and compiling your code we recommend the following options:

+ For Arduino and PC code: [Visual Code](https://code.visualstudio.com/) editor with use of the [PlatformIO](https://platformio.org/install/ide?install=vscode). The provided VmWare image has Visual Code already installed and is configured with a number of plugins to support building executables for your PC and Arduino (see the above installation script for details). You can start up Visual Code from a terminal by the command `code .` (don't forget the `.` (point!): it means it will use the current directory as project directory).
+ For PC-code: a simple text editor (like [Geany](https://www.geany.org/), [Sublime](https://www.sublimetext.com/), [Vim](http://www.vim.org/), [Emacs](https://www.gnu.org/software/emacs/) and a [terminal](https://www.google.nl/search?q=linux+terminal+tutorial) using the [make](https://linux.die.net/man/1/make) program.
	+ For building code using a terminal and make see [link](https://www.google.nl/search?q=linux+using+make+terminal).
+ For Arduino code: [Arduino IDE](https://www.arduino.cc/en/Main/Software). We will however require you to use [header-files](https://www.google.nl/search?q=header+files+in+c).

+ An online editor to try some basic stuff: [https://www.onlinegdb.com/](https://www.onlinegdb.com/)

+ Tip: you can install other software in your Linux environment by using [apt-get](https://www.google.nl/search?q=linux+using+apt-get+install).

## For Windows users

It is possible, with some effort on your side, to run C-programs on a Windows machine. This is however at your own initiative to install, and your teacher may offer limited support because of the availability of the Linux image.

### WSL

An option is to use WSL [Windows Subsystem for Linux(WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Install the following:

+ [Ubuntu](https://docs.microsoft.com/en-us/windows/wsl/install-win10) and execute the following command in a terminal:
	+ `sudo apt-get install -y build-essential make gcc g++`
+ [Visual Studio Code](https://code.visualstudio.com/) met de volgende extensies:
	+ [WSL integratie](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)
	+ [PlatformIO](https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide)
+ For onnecting USB devices to your WSL see [Connect-usb](https://learn.microsoft.com/en-us/windows/wsl/connect-usb#install-the-usbipd-win-project)

### MinGW Gcc compiler

The other option for c-compiling is [TDM-GCC MinGW Compiler](https://sourceforge.net/projects/tdm-gcc/). Here you have to install make and a gcc compiler. 

# Starting project

You can use the startingproject in the enclosed folder to test your setup. Content and way of working is explained [here](https://git.fhict.nl/technology/t-oer-prc2/-/blob/master/development-setup/startingProject/README.md).
