Giter Site home page Giter Site logo

maixduino's People

Contributors

bitsk avatar epozzobon avatar izhanghui avatar lamloei avatar majenkotech avatar mikljohansson avatar neutree avatar per1234 avatar richardclli avatar sabas1080 avatar sajattack avatar ut2uh avatar vamoosebbf avatar vanvuongngo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maixduino's Issues

Save snapshot to SD card

Is there any example that demonstrates how to save snapshot to SD card?

Thanks for your help.

Unable to install examples from Arduino IDE

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.

override pinMode setting

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.

Path Issue? (No such file or directory)

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.

esp8285 does not respond

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?

More comments in the code would be great

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

K210 not detected

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?

Xie xie.
MicroPython local build firmware.docx

FreeRTOS in Maixduino

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 ?

Path Issue? (No such file or directory)

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.

How to use Sipeed-ESP32-TF module on Maix-Bit?

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.

[Feature Requirement] Speech Synthesis

I have tested the offline Voice Recognition, it works great!
Looking forwarding to Speech Synthesis feature, then it will be more interactive for users.

Object Detection Example?

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?

WebClient runing error, send data failed

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

How to download these examples?

Does Maix bit have the following examples for arduino ide?
Object tracking
Face Recognition
Object Recognition
Line Tracking
Color Recognition Tag Recognition

No OSX version yet?

I did try to install on OSX, but the installer said:
Tool kflash is not available for your operating system.

Please make it available.

COM Name

Install maxiduino, the serial port name will always be Sipeed "Maix One Dock...", even if connect Arduino Uno Board
Screenshot from 2019-04-23 13-41-06

Maixduino board unable to finalize the upload procedure of code

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...

"mobile net init fail" on MAIXduino

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

hardware timer

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!

Maixduino Development Desktop Platform

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.

Can't detect SD card

I format two SD cards with FAT32, and use the example code CardInfo.ino to test.
Unfortunately, Maixduino can't detect any of them.

微信图片_20190716215324
微信图片_20190716215334
批注 2019-07-16 215406

Errors

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.

Cannot download support library

Hello!
I cannot download the libraries for the Maixduino board under Arduino IDE. Two screen shots are attached for reference purposes.

Can anyone help me to resolve the issue, please?

Thanks.
Error downloading status
Error downloading output window
Boards Manager Maixduino Install

<chrono> Accuracy is Seconds

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?

Using MD_PIN_MAP removes the ability to control K210 Chip IO Pins for SPI etc...

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.

Weird bug with String() function

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.

Wire issue

Any example with wire library hangs on wire functions calls

Lower Baud Rate

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.

maixduino not detected in macOS Catalina

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

yolo

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.