Arduino Pdf Manual

0 views
Skip to first unread message

Pricilla Igoe

unread,
Aug 3, 2024, 12:32:32 PM8/3/24
to malanalbwhitt

Running the code with those manual fixes for error 2.) compiles just fine, but does not output the correct results. The output of the program running on the arduino is always just 0, 0 and I noticed the arduino probably running out of memory. It is not possible to upload new code without forcing the bootloader to by double pressing the reset button.

I have tried fixing this generated code to use tvmgen_default_run(), which in turn calls tvmgen_default___tvm_main__(). With this I get useful results and the arduino does not run out of memory anymore, so uploads are always possible.

Q1.) What is the intended way to call the generated microTVM functions? It looks like the arduino adaptation of the microTVM workflow was not adapted accordingly. The workspace memory needs to be defined at a certain step in this process, but the initialization is not called in this case. In my case it was only possible by manually redirecting the functions. What is the intended way of microTVM to create this memory needed?

Q2.) I would appreciate any insight in the working of microTVMs Codegen, so that one does not have to manually fix the generated code but the codegeneration is fixed. There got to be a place where those faulty files are created? Is there a template where the structure is defined?

I am communicating from raspberry pi using python to my Arduino via usb and serial communication.I got it to work perfectly when I ask for an input but when I try and save a variable and push that through, it doesn't work. I think the Arduino is reading the serial until a newline is found. When I type input from python and press enter, the arduino successfully recognizes a newline and executes the code. However, when I save a string with \n at the end, the Arduino does not correctly receive the string and the rest of the code does not continue.

Hi,
I just received two XIAO ESP32C3 and I can not get them to auto-program then reset. Every time I need to program it I have to enter boot-mode. Once programmed it does not reset and run the program, just stays in boot mode till manual reset button is pressed.
I tried reflashing the bootloader as described in the Wiki but made no difference.

I have tried Arduino 1.8.19 and 2.04 and Platform-IO.
All platforms can program the ESP32C3 dev board when they think its an XIAO but none of them will program the actual XIAO without it being manually put in bootloader mode.

Hi Honvi,
Thanks for the info. That may be the case for boards with a USB to serial chip (FTDI, CP210x) but the XIAO ESP32C3 uses the inbuilt native USB port so it is not directly relevant in this case.
Other ESP32C3 boards I have tried program OK using the inbuilt USB port so it seems to indicate some error condition with the XIAO.

I have been using Xia ESP32-C3s for over 9 months using Visual Studio 2022 and VisualMicro plugin. The automatic bootloader worked perfectly during that time.
In November 2023 I bought some more and SOME of them will not program without pressing and holding the boot button when inserting the USB cable. Once programmed, it does not reset and run the program; It just stays in boot mode until the manual reset button is pressed.
Some of the new ones, however, do program automatically. I flashed them all to the latest bootloader just in case but that made no difference.
This random need for human intervention is unacceptable for me since the Xiao ESP32-C3 gets put in an enclosure where I lose easy access to the buttons.
Since some of them work properly, I know you know how to make it work. The question is why do some of them refuse to automatically program? My product design is too far down the path to change products unless I can find one with the same pinout, memory etc.

let me clarify, by 19200, i mean the begin serial rate inside the sketch
i agree that i cant read that fast but somewhere i saw someone say that 9600 is actually too slow for some microcontrolers, especially hardware or maybe its software serial, anyway one will theoredically lag the processor and cause intermittant errors

I have run in to this twice in last 2 days, im finding its more reliablle not haveing a program that pumps data out the USB into IDE. make a 1 sec delay if you need this serial output so when you upload it can recognise it as an upload. So after it stop accepting upload but i could see my serila output from my prog, i held boot and pluged in usb at same time, IDE was then able to upload my new program with deays in it, then hit reset buton and reconect

I would like to avoid the manual reset step, which is somewhat cumbersome. I was not having this issue when using my Arduino Uno and Mega, so I am pretty sure it has somewhat to do with the fact that I am now working with an Arduino Due.


HuskyLens is an easy-to-use AI machine vision sensor with 7 built-in functions: face recognition, object tracking, object recognition, line tracking, color recognition, tag recognition and object classification.

Short press the "Learning button" to learn the specified object; long press the "Learning button" to continuously learn the specified object from different angles and distances; if HuskyLens has learned the object before, short press the "Learn button" to make it forget.

Before using this product, it is strongly recommended to upgrade HuskyLens' firmware to the latest version to get the latest functions and the most stable experience. If your HuskyLens already has the latest firmware, no update is required. We recommand to upload the firmware on windows 10 using the HuskyLens Uploader since it features a GUI, and easy-to-use.

Download the USB to UART driver, and install it. Click here to download it.
HuskyLesn adopts the CP2102N chip to implement the USB to serial port function. After the driver is installed, you can use the microUSB cable to connect the USB port of HUSKYLENS to the computer's USB port. At this time, open the device manager and there should be a COM port whose name starts with "Silicon Labs CP210x". As shown below:

If the firmware uploading fails or the HuskyLens' screen does not light up, or other strange phenomenas, such as invalid buttons, HuskyLens can not learn, etc. you can try to click the "Reset Memory" button. After a while, the two fill lights of HUSKYLENS will light up, and HuskyLens has been reset. Please refer to the above steps and re-upload the firmware.

Select and adjust the parameter: Dial the function button left or right to select different parameter, then short press the function button to enter the parameter. Dial the function button left or right to adjust the parameter. Then short press the function button again to confirm the parameter.

Huskylens supports three UART baud rates (9600, 115200, 1000000), and I2C protocol. In addition, it supports auto-detection of the protocols, that is, Huskylens will automatically switch between UART and I2C. We recommend to use the auto detection protocol, which is simple and convenient. The default value is auto-detection.

When HuskyLens is detecting a object, the target will be automatically selected by a color frame on the screen. The coordinates of the color frame position x and y are assigned according to the following coordinate system. After getting the coordinates from the UART / I2C port, you can know the position of the object.

If you want HuskyLens to learn or recognize your face, that is, take a selfie, you can't see the screen at this time, you can determine the status according to the different colors of the RGB indicator.

However, HuskyLens only learned one plane (one-dimensional) of the face after the above operation, while human face is three-dimensional. If the angle of the face has been changed, HuskyLens may not recognize it. So you need to let HuskyLens learn a face from its different angles.

Then you can release the "learning button" to finish the learning. When Huskylens detected the learned face, a blue frame with words "Face: ID1" will be displayed, now HuskyLens can recognize the face from different angles.

3. Face Recognition:The learned face information will be automatically saved. When HuskyLens detects the learned face, this face will be selected by a blue frame and identified as face: ID1. The size of the frame will change with the size of the face, and the face will be tracked automatically.

When HuskyLens is in the face recognition mode, short press the "learning button", the screen will display "click again to forget". Before the countdown ends, short press the "learning button" again to delete the learned face information, then the yellow "+" symbol is displayed. Now you can let HuskyLens learn a new face.

Dial the function button until "Learn Multiple" is displayed, then short press the function button, and dial to the right to turn on the "Learn Multiple" switch, that is, progress bar turns blue and the square icon on the progress bar moves to the right. Then short press the function button to confirm this parameter.

Dial the function button to the left until "Save & Return" shows. And the screen prompts "Do you want to save the parameters?" Select "Yes" in default, now short-press the function button to save the parameters and return automatically.

The face ID is the same as the order of entering the face, that is: the learned faces will be marked as "face: ID1", "face: ID2", "face: ID3" in order, and different face IDs correspond to different color frames.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages