# First steps

### How it works

First, let's figure out how this program works. This script converts code from the Ducky Scritp language into code that is understandable to the Arduino compiler.

### Run the example

Firstly open the Terminal in current direcroty

{% hint style="info" %}
You should open CMD or PowerShell if you use Windows system
{% endhint %}

Now type in command prompt:

```
python3 encoder.py -d ./example/payload.txt -i ./example/example.ino
```

{% hint style="warning" %}
Use `python` in Windows

```
python encoder.py -d ./example/payload.txt -i ./example/example.ino
```
{% endhint %}

### Open Arduino IDE && Load program to your ATmega32u4

![Arduino open window](https://2721093661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmA72HvgKoTfi5qE4QgNC%2Fuploads%2FCoP5BzTWDqJQh4IbuIib%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png?alt=media\&token=27b80d6f-84c9-4e02-9e75-83b85f1f47f3)

Press `Ctrl+O` and choose `example/example.ino`&#x20;

Now choose Arduino Leonardo

![](https://2721093661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmA72HvgKoTfi5qE4QgNC%2Fuploads%2FBFkyVOWcrfCjR529kQuU%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png?alt=media\&token=3924dcd2-eeb9-4617-b3f2-a583a7602631)

Choose port

![](https://2721093661-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmA72HvgKoTfi5qE4QgNC%2Fuploads%2FcRTRGT9bMDLzypfQDNrT%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5.png?alt=media\&token=7a993876-c39c-46ab-82fa-129fa8ee2cf9)

Finally press `Ctrl+U`
