Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

🚀 Onethinx Sprouty Workshop 🚀

1 Prerequisites

1.1 Hardware

  1. Onethinx Sprouty
  2. Programmer + cables + adapter PCB.

Sprouty parts needed

1.2 PSoC Creator

PSoC Creator is the official tool from Infineon to do the chip configuration on PSoC6

1.3 Visual Studio Code + OTX Maestro extension installation

1.4 Sprouty and programming hardware

  • Make sure the programmer, adapter PCB and cable are connected to the Sprouty as shown:

    Sprouty, connection
  • NOTE: Do not install the battery when using the debugger.

2 Sprouty Project: Chip Configuration, Firmware Coding and Debugging

2.1 Sprouty Chip Setup / Configuration Project (uses Windows / PSoC Creator)

  1. Download the Sprouty Project from here
  2. After downloading, right click the .zip file and select 'Extract All'. Choose a short folder path and make sure the folder ends with \Sprouty_StartCode (e.g. C:\...\Sprouty_StartCode)
  3. Open (double click) Onethinx_Creator.cyprj inside the project folder ..\Sprouty_StartCode\Onethinx_Creator.cydsn. PSoC Creator will open
    PSoCCreator_WorkspaceExplorer
  4. Open (double click) TopDesign.cysch and view the internal wiring of the PSoC6, causing the LED to flash
  5. Open Pins from the Design Wide Resources to configure the LED IO pin
  6. Watch the schematic and find out the right IO pin the LED is connected with (as it's an RGB LED you may choose the color you like)
    LED pin
    NOTE: the Sprouty schematic can be found here
  7. Click the dropdown arrow and select the IO pin we just found for the LED
    PinConfig
  8. Now the LED is configured for the right IO, the OTX / PSoC6 configuration project is ready to be built
  9. Hit the 'Generate Application' Icon in the toolbar or select Build >> Generate Application
    Build
  10. Wait for PSoC Creator to generate the application files(API)
    Output
  11. The message Build Skipped will appear when generating the API is ready without issues
  12. Chip configuration is done, PSoC Creator may now be closed.

2.2 Firmware Coding and Debugging (uses Visual Studio Code)

  1. Start Visual Studio Code

  2. Open the Sprouty folder (not the .zip file)
    To open a folder in Visual Studio Code, click on File in the top menu and select Open Folder... from the dropdown menu. In the file dialog that appears, navigate to the folder you want to open, select it, and click Select Folder / Open. The folder will then open in Visual Studio Code, and you will see its contents in the Explorer pane on the left side. VScode Open

  3. As the project has not run on the PC before and as new APIs are made by PSoC Creator, the project needs to be Clean-Reconfigured before it can be built. Hit the Clean-Reconfigure button from the status bar at the bottom of VS Code
    Clean-Reconfigure NOTE: if you do not see these buttons, you have either the extension not installed or opened the wrong folder. Make sure the top-level folder you opened contains meson.build.*

  4. Press Select programmer and choose CMSIS DAP. If you have a different programmer, choose it. If you received your programmer with Sprouty, select CMSIS DAP. Select Programmer

  5. After successfull configuration the project can be Built and Launched from the debugger. Make sure the Sprouty is connected to the debugger and PC before launching the debug session. Hit the Build-And-Launch button from the status bar at the bottom of VS Code. Clean-Reconfigure

  6. Cross fingers and hopefully the firmware will be programmed, the project will enter debug mode (yellow bar) and the LED will be flashing 🎉
    Succeeded
    NOTE: your Sprouty model may differ from the one pictured

  7. If all built and programmed well, congratulations! 🤓
    You may head directly to Part 1: Soil Temperature, Air Temperature, Light intensity and LEDs.

    NOTE: if you are experiencing issues, you may contact us directly at our Discord channel