# README
This contains example apps and code to help with future development.

These examples can be edited using any text editor following valid syntax for MicroPython.

To aid with debugging any exceptions or debug messages will be outputted via the serial port on Connector 3 (The top most 5=pin connector on the unit) you can connect this port to your PC using an RLCAB001 cable.

To revert to normal operation delete the files from the SD Card

To get most of these programs working simply copy across the main.py file across onto the SD Card and power on the VBOX Touch. Or you can run them from the REPL.

## App_Loader
Can be used to load from multiple apps.

How to get working:

* Create folders with the name of your apps and everything to run the apps on your SD card.
* Add the App_Loader to the SD Card as just the main.py file not in a folder.
* Start the VBOX Touch with the SD Card inserted.
* Press the app you want to load. Swipe to view next/previous page(s).

If you want to leave an App you have to power cycle the VBOX Touch.

## Basic VBOX CAN Display
Displays basic CAN data

How to use:

* Connect the VBOX Touch to a CAN signal using a RLCAB0005
* Add the main.py file of this to the sd
* Power on the VBOX Touch
* Press and hold on any of the 4 sections of the display to change th display value.
* Press the app you want to load. Swipe to view next/previous page(s).

## CAN_Display
This is an example script demonstrating reading data from the CAN bus and displaying it on the screen

## Constants
Contains some commonly used constant conversion amounts. Can be useful to import this into apps.

## Dashboard
This script is of a vehicle dashboard with gauges and shift lights demonstating complex graphic elements and reading/displaying CAN and GNSS data as well as LED control

## File Parsing
Contains examples of how to parse different file types: .dbc, .xml.
Also contains file_utils.py which has some useful file checking features.

## Framework
This contains all the Frameworks. For more information see the Frameworks sections of the documentation.

## Game
Example script of a reaction game that demonstrates control of the LEDs, basic UI and the use of timers

## GNSS
This script captures GNSS coordinates at the press of a button.

How to use:

* Add the main.py file of this to the sd
* Power on the VBOX Touch
* Add a sats connection


## GForce_Meter
Example of an application displaying g=force readings derived for GNSS data on a g=ball demonstrating custom UI elements, images and fonts and the use of GNSS data. 

## Graphs
Example script showing how to draw basic bar graphs and demonstrating basic UI control.

## Graphics
Example script showing all built in UI elements and demonstrating how to control them, including basic use of buttons, sounds and swiping.

## GUI Graphics
### Filled shape
Contains a program that can be used to create a shape of any shape with an outline/fill of any colour. Has some demo text of how to use it at the bottom of the file.

### Image
Contains an example of how to manually create an image using ft8xx commands.

### Terminal
Example of how to create live updating text to fill a custom set space.

### Widgets
Example widgets created in python that are different to the standard ones that the ft8xx chip supports.

## LEDs
Example script showing how to control LED colours and brightness through simple slider controls.

## Logging


## Logo Display
Example script showing full screen logos demonstrating loading of images and gradients

## Maths

## Micropython Test Scripts

## Misc

## Piano
Example application of a virtual piano, demonstrating custom UI and built in sounds

## Record_Play
This application demonstrates recording sound from the microphone and playing it back through the speaker, whilst displaying sound levels on a graph

## Serial_Scales
Example of an application that takes in data over the serial port and displays it on the screen whilst also outputting the data over CAN

## Sounds
Example script that allows all built in sounds to be played through the built in speaker

## State Machines

## Steering Wheel Sensor

## Torque Display
Example of a fully featured application with lots of UI, examples of writing to the SD card, displaying data and reading data over CAN

## Unit Testing

## VIPS
Example script that works with Racelogic's VBOX Indoor Positioning System to show precise location within an indoor area by connecting to a VIPS Rover over a serial link

## VPRS
Example of a complete application that works with Racelogic's VBOX Precision Ranging System, this demonstrates UI design, serial and CAN data collection, custom fonts and images, swiping of the UI, LED control and file writing
