TurtlePlotBot v3
  • TurtlePlotBot
  • 1. TurtlePlotBot Chassis
    • 1.1. Hardware Parts List
    • 1.2. 3d Printed Parts
      • 1.2.1. Printing Instructions
    • 1.3. Assembly Instructions
      • 1.3.1. Step 1: Assemble the caster
      • 1.3.2. Step 2: Insert the pen lift dowels
      • 1.3.3. Step 3: Mount the 18650 battery holder
      • 1.3.4. Step 4: Mount the caster
      • 1.3.5. Step 5: Mount the stepper motors
      • 1.3.6. Step 6: Assemble the wheels
      • 1.3.7. Step 7: Install the pen lift servo
      • 1.3.8. Step 8: Mount the wheels
      • 1.3.9. Step 9: Assemble the pen holder
      • 1.3.10. Step 10: Install the pen holder
      • 1.3.11. Congratulations
  • 2. TurtlePlotBot Electronics
    • 2.1. ESP32 DrawBot Board
      • 2.1.1. Esp-32 DrawBot Board PC Board Layout
      • 2.1.2. Esp-32 DrawBot Board schematic
    • 2.2. Parts List
    • 2.3. Assembly Instructions
      • 2.3.1. Stepper Motor Connectors
      • 2.3.2. PEN Servo Header
      • 2.3.3. PORT B Header
      • 2.3.4. BATTERY Header
      • 2.3.5. MH-CD42 Module Header
      • 2.3.6. CHG Header
      • 2.3.7. USB Charge Connector
      • 2.3.8. SW1 Five-Way Switch
      • 2.3.9. MOT5V header
      • 2.3.10. RUN/HOLD/OFF Switch
      • 2.3.11. TTGO Module headers
      • 2.3.12. Congratulations
  • 3. Final Assembly Instructions
    • 3.1. Power Requirements
      • 3.1.1. 18650 Battery
      • 3.1.2. LiPo Cell
      • 3.1.3. AA Batteries
      • 3.1.4. Mount the DrawBot board
      • 3.1.5. Connect the Stepper Motors
      • 3.1.6. Connect the Pen Lift Servo
      • 3.1.7. Dress the wires
      • 3.1.8. Charger/Boost module
      • 3.1.9. Charger/Boost module Pinout
      • 3.1.10. Install the Charger/Boost module
      • 3.1.11. Congratulations
  • 4. TurtlePlotBot Programming
    • 4.1. Software Installation
      • 4.1.1. Deploying MicroPython
      • 4.1.2. Erase the Esp32 Flash
      • 4.1.3. Flash MicroPython
      • 4.1.4. Flash FAT image
      • 4.1.5. Congratulations
      • 4.1.6. MicroPython program to show free drive space
    • 4.2. turtleplotbot module
      • 4.2.1. Hardware
      • 4.2.2. Interface functions
      • 4.2.3. turtleplotbot implementation
    • 4.3. button Module
      • 4.3.1. Button class
      • 4.3.2. JoyStick class
    • 4.4. tftui User Inteface module
      • 4.4.1. Menu example program
      • 4.4.2. Form example program
      • 4.4.3. LCD Graphics Example
        • 4.4.3.1. message.py program
      • 4.4.4. Five way switch schematic
      • 4.4.5. tftui.UI class reference
    • 4.5. menu module
      • 4.5.1. Main Menu
      • 4.5.2. Connect to AP
      • 4.5.3. Disconnect AP
      • 4.5.4. Enable AP
      • 4.5.5. Disable AP
      • 4.5.6. Run Program
      • 4.5.7. Quit
    • 4.6. Example Programs
      • 4.6.1. Draw a draw box
        • 4.6.1.1. Simple Version
        • 4.6.1.2. Better way to draw a box
        • 4.6.1.3. Even better way to draw a box
      • 4.6.2. Draw a Star
        • 4.6.2.1. Simple program
        • 4.6.2.2. Using the tftui module
      • 4.6.3. Draw a polygon
      • 4.6.4. Approximate a circle or ellipse
      • 4.6.5. Write a Message
  • 5. turtleplot module reference
    • 5.1. Interface functions
      • 5.1.1. __init__
      • 5.1.2. _turn(angle)
      • 5.1.3. _move(distance)
      • 5.1.4. _pen(down)
    • 5.2. Class Methods Reference
  • 6. Fonts
    • 6.1. Bitmap Fonts
      • 6.1.1. Font file format
      • 6.1.2. Bitmap Font Tables
        • 6.1.2.1. vga1_8x8
        • 6.1.2.2. vga2_8x8
        • 6.1.2.3. vga1_8x16
        • 6.1.2.4. vga2_8x16
        • 6.1.2.5. vga1_16x16
        • 6.1.2.6. vga2_16x16
        • 6.1.2.7. vga1_bold_16x16
        • 6.1.2.8. vga2_bold_16x16
        • 6.1.2.9. vga1_16x32
        • 6.1.2.10. vga2_16x32
        • 6.1.2.11. vga1_bold_16x32
        • 6.1.2.12. vga2_bold_16x32
    • 6.2. Vector Fonts
      • 6.2.1. Introduction
      • 6.2.2. Font file format
      • 6.2.3. LCD Font Demo
      • 6.2.4. Vector Font Tables
        • 6.2.4.1. astrol.fnt
        • 6.2.4.2. cyrilc.fnt
        • 6.2.4.3. gotheng.fnt
        • 6.2.4.4. gothger.fnt
        • 6.2.4.5. gothita.fnt
        • 6.2.4.6. greekc.fnt
        • 6.2.4.7. greekcs.fnt
        • 6.2.4.8. greekp.fnt
        • 6.2.4.9. greeks.fnt
        • 6.2.4.10. italicc.fnt
        • 6.2.4.11. italiccs.fnt
        • 6.2.4.12. italict.fnt
        • 6.2.4.13. japan.fnt
        • 6.2.4.14. lowmat.fnt
        • 6.2.4.15. marker.fnt
        • 6.2.4.16. meteo.fnt
        • 6.2.4.17. misc.fnt
        • 6.2.4.18. music.fnt
        • 6.2.4.19. romanc.fnt
        • 6.2.4.20. romancs.fnt
        • 6.2.4.21. romand.fnt
        • 6.2.4.22. romanp.fnt
        • 6.2.4.23. romans.fnt
        • 6.2.4.24. romant.fnt
        • 6.2.4.25. scriptc.fnt
        • 6.2.4.26. scripts.fnt
        • 6.2.4.27. symbol.fnt
        • 6.2.4.28. uppmat.fnt
TurtlePlotBot v3
  • Docs »
  • 4. TurtlePlotBot Programming »
  • 4.5. menu module
  • View page source

4.5. menu module¶

The menu module uses the LCD display and five way switch to provide a method to configure and run MicroPython programs on the TurtlePlotBot without the use of another device such as a computer, phone or tablet. When run from the main.py file it will automatically run each time the TurtlePlotBot is powered on or reset.

4.5.1. Main Menu¶

_images/main_menu-1-1.jpg

4.5.2. Connect to AP¶

_images/main_menu-1-1.jpg

Use the the up and down buttons to highlight the “Connect to AP” option and press the Center button to select.

_images/main_menu-1-2.jpg

The TurtlePlotBot will scan for Wifi Access Points and show a list of all the available Access Points found.

_images/main_menu-1-3.jpg

Use the the up and down buttons to highlight the Access Point you want to connect to and press the Center button to select.

_images/main_menu-1-4.jpg

If you have connected to the Access Point before the password will already be filled in, otherwise it will be blank and you will have to enter the password using the joystick, buttons and on-screen keyboard.

Button

Action

UP

Moves the keyboard cursor up

DOWN

Moves the keyboard cursor down

LEFT

Moves the keyboard cursor left

RIGHT

Moves the keyboard cursor right

CENTER

Selects the current letter from keyboard

UPPER

Switches between keyboards

LOWER

Moves to next field if any

Button

Long Press Action

LOWER

Continue

_images/main_menu-1-5.jpg

Use the LEFT and RIGHT buttons to highlight “Accept” or “Cancel” then press the CENTER button continue or cancel.

_images/main_menu-1-6.jpg

The TurtlePlotBot will attempt to connect to the selected Access Point for up to 30 seconds.

_images/main_menu-1-7.jpg

If successful the IP address assigned to the TurtlePlotBot will be displayed and the password will be saved and recalled the next time you connect to the AP. If the connection fails a “Connection Failed” screen will appear. Press any button to return to the Main Menu.

4.5.3. Disconnect AP¶

Use the the up and down buttons to highlight the “Disconnect AP” option and press the Center button to select.

_images/main_menu-2-1.jpg

The TurtlePlotBot will be disconnected from the Access Point.

_images/main_menu-2-2.jpg

Press the Center Button to return to the Main Menu.

_images/main_menu-3-1.jpg

4.5.4. Enable AP¶

The ESP32 in the TurtlePlotBot has the capability to create a Wifi access point that allows WiFi clients to connect directly to it without using a router. Use the the up and down buttons to highlight the “Enable AP” option and press the Center button to select.

_images/main_menu-3-2.jpg

Enter the name and password to use for the new Access Point using the joystick, buttons and on-screen keyboard.

Button

Action

UP

Moves the keyboard cursor up

DOWN

Moves the keyboard cursor down

LEFT

Moves the keyboard cursor left

RIGHT

Moves the keyboard cursor right

CENTER

Selects the current letter from keyboard

UPPER

Switches between keyboards

LOWER

Moves to next field if any

Button

Long Press Action

LOWER

Continue

_images/main_menu-3-3.jpg

Use the LEFT and RIGHT buttons to highlight “Accept” or “Cancel” then press the CENTER button continue or cancel. The AP Name and password you entered will be saved for the next time.

_images/main_menu-3-4.jpg

4.5.5. Disable AP¶

Use the the up and down buttons to highlight the “Disable AP” option and press the Center button to select.

_images/main_menu-4-1.jpg
_images/main_menu-4-2.jpg

4.5.6. Run Program¶

The “Run Program” option shows a list of MicroPython programs in the /programs directory and allows you to select one to run.

_images/main_menu-5-1.jpg

Use the UP and DOWN buttons to highlight a program, then press the CENTER button to run the selected program.

_images/main_menu-5-2.jpg

4.5.7. Quit¶

The “Quit” option will exit the menu program and return to the MicroPython REPL.

_images/main_menu-6-1.jpg
_images/main_menu-6-2.jpg
Next Previous

© Copyright 2019-2020, Russ Hughes

Built with Sphinx using a theme provided by Read the Docs.