HID flowcode 8 arduino leonardo

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

kris Werbrouck
Posts: 18
Joined: Mon Feb 25, 2013 10:15 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

HID flowcode 8 arduino leonardo

Postby kris Werbrouck » Sun Feb 24, 2019 1:33 pm

I want to use the HID component in flowcode 8 with a arduino leonardo. Programming the arduino leonardo is possible, but there is no output.
Attachments
test flowcode 8 arduino leonardo.fcfx
(9.08 KiB) Downloaded 43 times

User avatar
Benj
Matrix Staff
Posts: 14797
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4759 times
Been thanked: 4362 times
Contact:

Re: HID flowcode 8 arduino leonardo

Postby Benj » Mon Feb 25, 2019 6:04 pm

Hello,

The AVR/Arduino devices require a slight build modification to include the USB libraries.

Here is the documentation on how to perform the modification.



To compile to an AVR device using USB you must point the compiler to a different batch file to allow it to include the various USB libraries in the compilation.

Simply click on Build -> Compiler Options.

Click on the AVR/Arduino -> Default item and then click the save icon at the top right hand side of the window.

Give the new setting a name e.g. AVRUSB and click OK.

Click on the new item AVR/Arduino -> AVRUSB and ensure that it is ticked as the default compiler for the AVR/Arduino platform.


Change the compiler location from this.
$(compileravr)batchfiles\avra.bat

To this.
$(compileravr)batchfiles\avra_usb.bat


Change the compiler Parameters from this
$(chip:l) "$(outdir)" "$(target)" "$(outdir)$(target).c" "$(outdir)$(target).lst"

To one of the following based on your USB type.
$(chip:l) "$(outdir)" "$(target)" Serial
$(chip:l) "$(outdir)" "$(target)" HID
$(chip:l) "$(outdir)" "$(target)" Slave - Not Currently Supported
$(chip:l) "$(outdir)" "$(target)" MIDI - Not Currently Supported


Let us know how you get on.

kris Werbrouck
Posts: 18
Joined: Mon Feb 25, 2013 10:15 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: HID flowcode 8 arduino leonardo

Postby kris Werbrouck » Wed Mar 13, 2019 9:18 pm

I still have problems. See attachments.
Attachments
Error USBHID2.JPG
Error USBHID2.JPG (94.42 KiB) Viewed 695 times
Error USBHID1.JPG
Error USBHID1.JPG (151.62 KiB) Viewed 695 times
compiler.JPG
compiler.JPG (45.4 KiB) Viewed 695 times