Getting Started

Programming with Tynker Workshop

A program is basically a list of instructions that tells the computer what to do. Programs are written in a programming language to make it easier for humans to work with. The finished program is then compiled, or translated, into a machine-readable language that the computer can use to process and execute your program. This machine-readable code is stored in what is called a HEX file format (.hex).

Tynker Workshop is an online IDE (integrated development environment) for writing and compiling programs for your HiFive Inventor board. You can access Tynker Workshop on a computer with internet access at HiFiveInventor.com. Once you’ve redeemed the code included with your HiFive Inventor board and set up an account, you can start exploring all the possibilities with your HiFive Inventor!

Block Programming in Tynker

Tynker is a visual programming language that teaches basic programming by snapping code blocks together to write instructions for your HiFive Inventor board. Block programming is recommended if you’re new to coding or not accustomed yet to typing on a keyboard.

You can get started learning how to use Tynker blocks by following “Glitch Manor” and “Doctor Who: Planet of Adventure” coding lessons! Each lesson will walk you through Tynker’s block programming language while you explore the game-based adventures.

Once you’ve finished the Doctor Who adventure, or if you want to skip right to creating your own coding projects, click on the “Create Project” button on the Student Dashboard page. Then choose “HiFive Block Project” to get started using Tynker blocks to program your HiFive Inventor!

MicroPython with Tynker Code Editor

The HiFive Inventor supports the MicroPython programming language. MicroPython is a compact version of the popular Python programming language. MicroPython is a great way to get used to writing out lines of code for the first time, while also introducing you to one of the world’s most widely used programming languages.

If you’ve never written Python (or MicroPython) before, don’t worry! You can get started learning Python with “Intro to Python” - a complete introduction to real-world Python and then program your own gadgets using the MicroPython on the HiFive in “Doctor Who: The Book of Brilliant Inventions.” This adventure is a series of MicroPython lessons that will walk you through writing your first lines of MicroPython code while exploring time and space with the Doctor.

To get started writing your own MicroPython programs, click on the “Create Project” button from the Student Dashboard page. Then click on “HiFive MicroPython Project” to begin. You can read more about the cool things you can code your HiFive Inventor by reading more about MicroPython functions.

Flashing your HiFive

After writing code for your HiFive Inventor, follow the steps to flash your program to the board. Flashing your program means you’re writing the program to the HiFive Inventor’s flash memory. Once your program is in memory, your HiFive Inventor will be able to read and execute it.

WebUSB Flashing

Note: Direct flash via WebUSB requires using the latest version of either Microsoft Edge, Google Chrome or Opera web browsers. If you use Firefox or Safari see Download HEX File Flashing.

Step 1:

Plug your HiFive Inventor into the computer or device you’ve written your program on, where it will appear as a USB drive called “HiFive”.

Step 2:

Click the “Deploy” button in the window you’ve written your code in. Click anywhere again to escape the default attempt to program with WebBluetooth and prompt the ability to download by WebUSB or download a hex file for drag and drop. Choose “Try Sending through USB.” Select “HiFive - Paired” and then Connect. Your program’s HEX file will automatically flash to your HiFive!

WebBluetooth Flashing

Note: Direct flash via WebBluetooth requires using the latest version of either Microsoft Edge, Google Chrome or Opera web browsers. If you use Firefox or Safari see Download HEX File Flashing.

Note: Direct flash via WebBluetooth is only applicable when a blocks program is being flashed onto the HiFive and that the last program flashed onto the HiFive was a blocks program (not micropython) and did not make use of the Wi-Fi capabilities. This is a known limitation that will be fixed in the future.

Step 1:

Plug the battery pack into your HiFive Inventor or connect the HiFive to a USB source of power. This does not have to be the same computer or device you’ve written your program on, however, nothing precludes it from being so in which case it will appear as a USB drive called “HiFive”.

Step 2:

Click the “Deploy” button on the window you’ve written your code in. In the pop up window, select your HiFive and click “Pair.” Your program’s HEX file will automatically flash to your HiFive! Subsequent programs will automatically pair and flash to your HiFive!

Download HEX File Flashing
Step 1:

Plug your HiFive Inventor into the computer or device you’ve written your program on, where it will appear as a USB drive called “HiFive”.

Step 2:

Click the “Deploy” button in the window you’ve written your code in. Click anywhere again to escape the default attemp to program with WebBluetooth and prompt the ability to download by WebUSB or download a hex file for drag and drop. Choose “Download HEX File.” If your browser prompts you for a location to save the file choose the removable drive named HiFive. Your program’s HEX file will automatically flash to your HiFive!

If your browser does not prompt you, rather, automatically downloads the file, look for the file named tynker.hex in your Downloads folder. If many files named tynker.jex exist, the newest one will have the largest number appended. Drag and drop the tynker.hex file to the removable drive named HiFive. If using this method of flashing, its recommended to change the browser settings to “Ask where to save each file before downloading”