sipeed / maixduino Goto Github PK
View Code? Open in Web Editor NEWArduino port on Maix board ( k210 )
Home Page: https://maixduino.sipeed.com
License: Other
Arduino port on Maix board ( k210 )
Home Page: https://maixduino.sipeed.com
License: Other
Any example with wire library hangs on wire functions calls
I did try to install on OSX, but the installer said:
Tool kflash is not available for your operating system.
Please make it available.
Hi
I have the next error cannot declare variable 'camera' to be of abstract type 'Sipeed_OV2640'
Arduino IDE version 1.8.9 with example mobilenet and selfie
Thanks
I wrote a very simple benchmark to compare several microcontrollers, including kendryte k210. Results are sent to Serial. It took me a long time to figure out why I had no output, as I thought the culprit was the Serial to usb implementation (or a driver problem with my computer)
I'll attach the code. This code does not work : no blinking led (which I added to see if the code got executed or not), not even once, and no output to the console.
By replacing String(y) with just y on line 98, it does work.
This baffles me, especially as the String function gets called a few lines earlier, with a float then a double and a precision of 16 digits, with no problem whatsoever...
The same code, with String(y), ran perfectly with atmega 2560, stm32f103, stm32f446re, esp32...
Trying to reduce the code to just keep the offending section, then the String() function works correctly...
It seems we can't join .cpp file, so here is my main.cpp pasted :
`#include <Arduino.h>
int isPrime(int n) {
for (int i = 2; i < n; i++)
{
if (n % i == 0) return 0;
}
return 1;
}
int countPrimesUpTo(int n) {
int nb = 0;
for (int i = 2; i < n; i++) // no reason to aim at efficiency here...
{
if (isPrime(i)) {
nb++;
}
}
return nb;
}
float precisionFloat(int steps) {
float x = 2;
for (int i=0; i < steps; i++) {
x = sqrtf(x);
}
for (int i = 0; i < steps; i++) {
x *= x;
}
return x;
}
double precisionDouble(int steps) {
double x = 2;
for (int i=0; i < steps; i++) {
x = sqrt(x);
}
for (int i = 0; i < steps; i++) {
x *= x;
}
return x;
}
float calcFloat(int n) {
float x;
for (int i=0; i < n; i++) {
x = 0.1;
for (int j = 0; j < 1000; j++) {
x = (float)4 * x * ((float)1 - x);
}
}
return x;
}
double calcDouble(int n) {
double x;
for (int i=0; i < n; i++) {
x = 0.1;
for (int j = 0; j < 1000; j++) {
x = (double)4 * x * ((double)1 - x);
}
}
return x;
}
void setup() {
// put your setup code here, to run once:
Serial.begin(57600);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("beginning tests");
digitalWrite(LED_BUILTIN, LOW);
unsigned long StartTime = millis();
int nb = countPrimesUpTo(20000);
unsigned long elapsedTime = millis() - StartTime;
Serial.print(nb);
Serial.println(" primes until 20000, time spent ");
Serial.print(elapsedTime);
Serial.println(" milliseconds");
Serial.println(String(precisionFloat(15),8));
Serial.println(String(precisionDouble(25), 16));
StartTime = millis();
float x = calcFloat(1000);
elapsedTime = millis() - StartTime;
Serial.print(elapsedTime);
Serial.println(" milliseconds for 1000 iters (float)");
Serial.println(String(x, 8));
digitalWrite(LED_BUILTIN, HIGH);
StartTime = millis();
double y = calcDouble(1000);
elapsedTime = millis() - StartTime;
Serial.print(elapsedTime);
Serial.println(" milliseconds for 1000 iters (double)");
Serial.println(String(y));
digitalWrite(LED_BUILTIN, HIGH);
delay(2000);
}`
A precision : I'm using platformio with vscode.
I have tested the offline Voice Recognition, it works great!
Looking forwarding to Speech Synthesis feature, then it will be more interactive for users.
voice_control这个demo随便说其他关键词大概率是第一种情况
We want to respond to M5StickV Arduino.
M5StickV has OmniVision OV7740 sensor, etc.
Can't find it in the API
I'm trying to get started with my Maixduino Kit by running some examples from the Arduino IDE, such as Blink, but I'm stuck. When I try and upload I get the error:
Cannot run program "/usr/local/bin/python3": error=2, No such file or directory
...
An error occurred while uploading the sketch
I'm using Arduino IDE 1.8.9 on a MacBook Pro. I've installed the Maixduino(k210) board version 0.3.8, and I've selected the "Sipeed Maix Go Board" option.
I have tried the WiFiEsp library examples WebClient and WebServer. After indicating that the Maix GO has hardware serial, defined in sipeed_go.h, they compiled. With a logic analyzer on pins 6 and 7 I verified that the esp8285 gets the correct signal (AT\r\n). But the esp8285 does not respond and the example concludes that it is not active. Is there something I should do to make the esp8285 active?
Hi, i see you use kendryte-standalone-sdk so it not support FreeRTOS to create task but want to use FreeRTOS because my application needs do everything in same time. so i think i will implement FreeRTOS by self. but i have no idea about implement FreeRTOS.
Can you recomment something for me ?
Does Maix bit have the following examples for arduino ide?
Object tracking
Face Recognition
Object Recognition
Line Tracking
Color Recognition Tag Recognition
Hello!
For the Maixduino board, the Arduino IDE (v1.8.9) currently provides only 1.0 & 1.5 Mbps support for code upload. @loboris identified that the CH552T has an issue that inhibits its use at these settings. I could flash his MicroPython firmware only at this speed. The higher values (viz. >= 1.0) failed to detect the MCU to initiate the code upload.
With the Arduino IDE, we are accustomed to using 0.1152 Mbps for serial communications. Is it possible to provide such support with the K210 library that you have published? Your considerate attention to this request would help us to make better use of Maixduino in our applications.
Thanks for making this repository. I think the arduino compatibility could be more important for large scale adoption of the k210 boards of Sipeed than micropython is.
However, there are some issues.
After installing maixduino as described here, I get the following errors:
During starting the arduino IDE:
Index error: could not find referenced tool name=kflash version=0.4.1 packager=Maixduino
I noticed that in the json only the kflash version 1.0.0 is mentioned in the tool section, could that be an issue? On the other hand, both 0.4.1 and 1.0.0 are installed in the Maixduino/tools/kflash directory.
When compiling the mas_basic example I get the following error:
/home/j/.arduino15/packages/Maixduino/tools/riscv64-unknown-elf-gcc/8.2.0/bin/../libexec/gcc/riscv64-unknown-elf/8.2.0/cc1plus: error while loading shared libraries: libisl.so.19: cannot open shared object file: No such file or directory
Searching the internet shows that this is some gcc error, and thus probably caused by the compilers. Repairing this seems to be tricky, so I used my separately installed toolchain that I know is working. This was achieved by adding the following lines at the appropriate lines in board.txt:
go.menu.toolsloc.manual=Manual
go.menu.toolsloc.manual.compiler.path=/home/j/bin/kendryte/kendryte-toolchain/bin/
I get a lot of compiler warnings, but it does produce a .bin file.
At first uploading did not work while no error message was produced. After switching the MAIX Go board off and on, and waiting a while, uploading did succeed. There is, however, no visible output. Not in the IDE (of course, but the other kflash versions I used automatically started a minicom) and not in the arduino serial monitor. Starting an external serial monitor (cutecom) does show a small portion of the output (about 5 lines), but then stops.
Starting a minicom myself via a python3 script:
import serial.tools.miniterm
serial.tools.miniterm.main(default_port='/dev/ttyACM0', default_baudrate=9600, default_dtr=False, default_rts=False)
does produce the correct output.
Hopefully some of these issues can be repaired, or maybe you can tell me what I should do differently.
I'm trying to use dial switch on Maix Go.
but 'digitalRead(PIN_KEY_UP)' result is -1.
code
#include <Arduino.h>
void setup() {
Serial.begin(115200);
pinMode(PIN_KEY_UP, INPUT);
pinMode(PIN_KEY_PRESS, INPUT);
pinMode(PIN_KEY_DOWN, INPUT);
}
void loop() {
Serial.print("UP: "); Serial.print(digitalRead(PIN_KEY_UP));
Serial.print(", PRESS: "); Serial.print(digitalRead(PIN_KEY_PRESS));
Serial.print(", DOWN: "); Serial.print(digitalRead(PIN_KEY_DOWN));
Serial.println("");
delay(1000);
}
result
> Executing task: platformio device monitor <
--- Miniterm on /dev/cu.usbserial-141301 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
UP: -1, PRESS: 1, DOWN: 1
UP: -1, PRESS: 1, DOWN: 1
UP: -1, PRESS: 1, DOWN: 1
UP: -1, PRESS: 1, DOWN: 1
UP: -1, PRESS: 1, DOWN: 1
UP: -1, PRESS: 1, DOWN: 1
and i tried next code. (comment out 'pinMode(PIN_KEY_DOWN)')
'digitalRead(PIN_KEY_UP)' result is ok.
code
#include <Arduino.h>
void setup() {
Serial.begin(115200);
pinMode(PIN_KEY_UP, INPUT);
pinMode(PIN_KEY_PRESS, INPUT);
// pinMode(PIN_KEY_DOWN, INPUT);
}
void loop() {
Serial.print("UP: "); Serial.print(digitalRead(PIN_KEY_UP));
Serial.print(", PRESS: "); Serial.print(digitalRead(PIN_KEY_PRESS));
// Serial.print(", DOWN: "); Serial.print(digitalRead(PIN_KEY_DOWN));
Serial.println();
delay(1000);
}
result
> Executing task: platformio device monitor <
--- Miniterm on /dev/cu.usbserial-141301 115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
␀␀␀␀␀␀␀UP: 1, PRESS: 1
UP: 1, PRESS: 1
UP: 1, PRESS: 1
UP: 1, PRESS: 1
UP: 1, PRESS: 1
UP: 1, PRESS: 1
i think so 'pinMode(PIN_KEY_DOWN, INPUT)' was override 'pinMode(PIN_KEY_UP)' setting.
How can I use OpenPoseAPI on MaixDuino ?
Generally on google, there're many sample about face detection, but no sample or reports about using OpenPoseAPI. still not supported ? or need to try use it ?
Hello!
I ran into a bug with "mobilenet_v1" example on my MAIXduino - it begins to load model file, but "mobile net init fail" appears on serial port monitor.
I tried to find the reason and I saw mbnet.begin(kmodel_name)
return value -6.
I used different MicroSD cards and model files from your site with the same result. As KPUClass
source code is not available (I did not find it), I can't debug it any further.
Please help to solve that.
Many thanks!
With regards,
Maksim
I have a project that requires advanced usage of the K210 IO pins on a Sipeed Maixduino board.
However, the default digitalWrite, pinMode etc. methods use an array called MD_PIN_MAP for pin mapping. This is restrictive and doesn't allow full use of the K210 IO pins.
Provided that you know what you are doing, here is my fix:
void pinModeIO(uint8_t pin, uint8_t mode)
{
fpioa_function_t function = (fpioa_function_t)(FUNC_GPIOHS0 + pin);
fpioa_set_function(pin, function);
gpiohs_set_drive_mode(pin, (gpio_drive_mode_t)mode);
}
#define digitalWriteIO(PIN, VALUE) gpiohs_set_pin(PIN, (gpio_pin_value_t)VALUE)
#define digitalReadIO(PIN) gpiohs_get_pin(PIN)
I am finding myself having to rewrite the SPI and UART library to accommodate this change too.
Is there any example that demonstrates how to save snapshot to SD card?
Thanks for your help.
When using other digital pin, SD card always inits failed. It can 100% reproduce.
reproduce step:
Using the example code ReadWrite.ino, add one line code as pinMode(xxx, OUTPUT) in setup function
Maix has two ways to accelerate the FFT process, using the APU or the individual FFT accelerator. Is it possible to use any of these sources with Maixduino?
The KPU library has an example on how to do object classification, but not object detection. Can you provide an example on how to do object detection?
Hello!
I have used two different cables and two different ports to connect to Maixduino from Ubuntu 19.04 desktop. I have had ZERO luck. Attached is a summary of my exercise. I can provide additional details upon request.
Will someone at Sipeed be kind enough to help me with this persistent and repeatable issue?
It would be great to have a constant to identify Maixduino. Is there any?
I've seen this one in ArduinoCore-k210 , Arduino.h file
#ifndef KENDRYTE_K210
#define KENDRYTE_K210 1
#endif
which enables the usage of this library here, updated to work with K210
https://github.com/baorepo/Adafruit_NeoPixel
Hello, I've just tested some benchmark at 400Mhz and 600Mhz and the performance outputs the same. I think this options aren't working on Maixduino yet.
https://github.com/PaulStoffregen/CoreMark
Thanks
Typo in function name:
https://github.com/sipeed/Maixduino/blob/master/libraries/Camera/src/Camera.h#L79
Could you supply an example for face detection? It is a very useful application.
Thank you very much!
Maixduino 0.3.8 and 0.3.7 tested on Arduino 1.8.8 and 1.8.9. The directory contains the files but for some reason are not being seen by arduino.
-- \Maixduino\hardware\k210\0.3.8/cores/arduino/kendryte-standalone-sdk/lib/bsp/include: No such file or directory
(happening with all files in cores/arduino/...)
Possibly an issue on my end, but not sure.
Hi,
with maixpy, we can use a = kpu.init_yolo2(task, 0.5, 0.3, 5, anchor)
How to load yolo model on Maixduino
Thanks
Using the library via PlatformIO, my timers can't activate sooner than 1 second after starting. When I print the time deltas I get only increments of 1000 ms - a second. Is this expected behavior?
在我烧录人脸识别Demo时,无法读取SD卡内的模型文件。
Arduino official boards use almost the same wifi chip with Maixduino. In order to keep WIFI API compatibility, please port the official codes into Maixduino repo.
Arduino WIFI boards:
ARDUINO UNO WIFI REV2
ARDUINO NANO 33 IOT
WIFI Library and firmware:
WiFiNINA
Firmware for u-blox NINA W102 WiFi/BT module
u-blox NINA:
NINA-W1 series.pdf
Do you mind to provide a high level hardware timer? Like the timer for the Teensy board and the zerotimer for the SAMD21/51 board, with callback and interrupt. If a lot of efforts are needed, an example of some work around is greatly appreciated as well. Thanks!
SPIClass spi0(SPI0); // MUST be SPI0 for Maix series on board LCD
Sipeed_ST7789 lcd(320, 240, spi0);
Is there any conflicts? How to fix this issue?
Is it possible to do Maixduino development work on the following desktop client platform:
Linux BeUlta 5.0.0-21-generic #22-Ubuntu SMP Tue Jul 2 13:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
I have the board identified as Sipeed Maixduino and the Port and Programmer settings as advised in the Maixduino documentation. The on-board LED does not blink. The output window displays:
Programming BIN: |=============================================================================================================================================================================================================================================================================================================================================================================================================================================================| 100.0% 53kiB/s
[INFO] Rebooting...
Can I use Ubuntu 19.04 connected to Maixduino via USB port for development tests? Is there any reference documentation?
Thanks for any feedback. Kind regards.
Hello,
I am having a hard time making the Maixduino detected in macOS Catalina. I have used a USB-C to USB-C data cable to connect the Maixduino to my MacBook Pro 13" (2017). I also have the Maixduino powered up and it shows "Welcome to MaixPy" in the LCD screen, the reset button also works. But so far macOS doesn't detect the board. I have checked ls /dev/cu.* and nothing changes after I connect the board to the mac. Anybody successfully worked with the Maixduino board from macOS Catalina (version 10.15)?
Thanks
I just received Maixduino board from Seeedstudio:
https://www.seeedstudio.com/Sipeed-Maixduino-for-RISC-V-AI-IoT-p-4046.html
I understand version 0.3.9 should support this board. I set the board type to: Sipeed Maixduino Board in Arduino IDE.
I tried to compile and upload the code to the board, however after the "Downloading ISP" is finished, I get the following error:
"[WARN] Index Error, retrying... "
After several trials, the uploading procedure fails with the error:
"[ERROR] Failed to Connect to K210's Stub "
Please help how to resolve this issue...
Maixduino 0.3.8 and 0.3.7 tested on Arduino 1.8.8 and 1.8.9. The directory contains the files but for some reason are not being seen by arduino.
-- \Maixduino\hardware\k210\0.3.8/cores/arduino/kendryte-standalone-sdk/lib/bsp/include: No such file or directory
(happening with all files in cores/arduino/...)
Possibly an issue on my end, but not sure.
I'm reading through SpeechRecognizer::spch_recg and would like to see a few comments such as
// flattening sound recording
// inject flat sound recording into the neural net
// NN result
etc... so we can learn from example.
thank you
Maixduino hardware has i2s for audio. It would be better to supply an i2s library to support it.
https://github.com/arduino/ArduinoCore-samd/tree/master/libraries/I2S
I'd like to use Sipeed-ESP32-TF module on Maix-Bit but the existing examples of your WiFiEsp modification seem to lack SPI implementation for this configuration.
Please guide me how to proceed further.
I ran WebClient example and got an error that failed to send data
[WiFiEsp] Initializing ESP module
[WiFiEsp] Initilization successful - 2.2.1
Attempting to connect to WPA SSID: GZBD
[WiFiEsp] Failed connecting to GZBD
Attempting to connect to WPA SSID: GZBD
[WiFiEsp] Failed connecting to GZBD
Attempting to connect to WPA SSID: GZBD
[WiFiEsp] Failed connecting to GZBD
Attempting to connect to WPA SSID: GZBD
[WiFiEsp] Connected to GZBD
You're connected to the network
SSID: GZBD
IP Address: 192.168.1.197
Signal strength (RSSI):-77 dBm
Starting connection to server...
[WiFiEsp] Connecting to arduino.cc
Connected to server
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] Data packet send error (2)
[WiFiEsp] Failed to write to socket 3
[WiFiEsp] Disconnecting 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.