All Projects → Seeed-Studio → Arduinocore K210

Seeed-Studio / Arduinocore K210

Seeed code for the Kendryte K210 SoC on Arduino

Labels

Projects that are alternatives of or similar to Arduinocore K210

Esp32 Hub75 Driver
A small, simple, passive driver for HUB75 based LED panels
Stars: ✭ 37 (-11.9%)
Mutual labels:  arduino
Arduino Rgb Tools
A arduino library with tools for controlling an RGB-LED
Stars: ✭ 37 (-11.9%)
Mutual labels:  arduino
Pixeltime
An animated weather clock that is easy to make
Stars: ✭ 41 (-2.38%)
Mutual labels:  arduino
Sdwebbrowse
File browsing using the Arduino Ethernet shield
Stars: ✭ 37 (-11.9%)
Mutual labels:  arduino
Hydroponic Automation
A program to monitor and control 8 variables of a hydroponic gardening system
Stars: ✭ 38 (-9.52%)
Mutual labels:  arduino
Esprfremote
Sketch to use an ESP mit Arduino as a RF remote for chap-ass power outlets (BH9938)
Stars: ✭ 39 (-7.14%)
Mutual labels:  arduino
Arduino Rc 6ch Radio Control
Arduino project to upgrade cheap Hobbyking HK-T6A or Flysky FS-CT6B transmitters or any other old RC TX
Stars: ✭ 36 (-14.29%)
Mutual labels:  arduino
Wattuino
Arduino compatible Boards and Modules based on Microchip ARM and AVR Microcontroller
Stars: ✭ 41 (-2.38%)
Mutual labels:  arduino
Pulsesensorstarterproject
The Best Way to Get Started with your PulseSensor and Arduino
Stars: ✭ 38 (-9.52%)
Mutual labels:  arduino
Esp8266 Rtc Memory
Code for the YouTube video
Stars: ✭ 40 (-4.76%)
Mutual labels:  arduino
Wifi ducky
Upload, save and run keystroke injection payloads with an ESP8266 + ATMEGA32U4
Stars: ✭ 991 (+2259.52%)
Mutual labels:  arduino
Darm
A desktop arm that can write and draw.
Stars: ✭ 38 (-9.52%)
Mutual labels:  arduino
Arduino Tachometer
Arduino car tachometer
Stars: ✭ 39 (-7.14%)
Mutual labels:  arduino
Emonth
An open-source wireless temperature and humidity monitoring node
Stars: ✭ 37 (-11.9%)
Mutual labels:  arduino
Fram mb85rc i2c
Arduino library for I2C FRAM - Fujitsu MB85RC & Cypress FM24, CY15B
Stars: ✭ 41 (-2.38%)
Mutual labels:  arduino
Esp8266 Deauth
Deauth / Deauthentication proof of concept on the ESP8266
Stars: ✭ 36 (-14.29%)
Mutual labels:  arduino
Iotz
compile things easy 🚀
Stars: ✭ 39 (-7.14%)
Mutual labels:  arduino
Usb Keystroke Injector
☠️ An Arduino-based USB keyboard simulator which injects keystrokes via Bluetooth protocol or predefined payloads in a SD card.
Stars: ✭ 42 (+0%)
Mutual labels:  arduino
Microgranny2
Stars: ✭ 41 (-2.38%)
Mutual labels:  arduino
Deskmate
A tiny MQTT-powered dashboard and control center.
Stars: ✭ 39 (-7.14%)
Mutual labels:  arduino

ArduinoCore-k210

ArduinoCore-k210. Based on kendryte-standalone-sdk, we added the full ArduinoCore-API interface to support Arduino IDE, Linux, Windows, Mac OS X and other development environments. With the support of the ArduinoCore-k210, all k210-based development boards can run Grove Arduino Library and many excellent Arduino libraries in the community of Arduino. If you're not familiar with Arduino, you can find the documentation you need here.

Add the k210-based board to the Arduino IDE

Step 1. Download the latest Arduino IDE

You need a Arduino IDE that after version 1.6.4, please download one if there's no Arduino IDE in your computer.

Step 2. Setting your Arduino IDE

Open your Arudino IDE, click on File > Preferences, and copy below url to Additional Boards Manager URLs

https://raw.githubusercontent.com/Seeed-Studio/Seeed_Platform/master/package_seeeduino_boards_index.json

Note:No additional Settings are required on Windows, but on Linux and Macosx platforms, kflash requires python3 environment and you will need to execute the following command to install the dependent software.`

#Maciosx
brew install python  pip
pip3 install pyserial
brew install isl
brew install libmpc
#ubuntu or debian
sudo apt update
sudo apt install python3 python3-pip
sudo pip3 install pyserial

Build ArduinoCore-k210 with cmake

git clone https://github.com/kendryte/kendryte-standalone-sdk
git clone https://github.com/seeed-Studio/ArduinoCore-k210 kendryte-standalone-sdk/src/ArduinoCore-k210
mkdir build && cd build
# Make sure you cross-compile the toolchain with the correct path
cmake .. -DPROJ=ArduinoCore-k210  -DSKETCH=Blink -DTOOLCHAIN=/opt/kendryte-toolchain/bin && make -j8

cmake is very friendly on Linux and Macosx. You can even add a lot of third-party libraries. Here's an example of adding miropython as a third party

Developing kendryte-standalone-sdk

ArduinoCore-k210 is also supported as a normal IDE. For example, when developing kendryte-standalone-sdk, you also can use the Arduino Library WS2812FX. This way you can run all the kendryte-standalone-demo in the Arduino IDE.

#include <WS2812FX.h>

#define LED_COUNT 32
#define LED_PIN 13

#define TIMER_MS 5000

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_RGB + NEO_KHZ800);

unsigned long last_change = 0;
unsigned long now = 0;

extern "C" {
#include <stdio.h>
#include <unistd.h>
#include "fpioa.h"
#include "gpiohs.h"
#include "sysctl.h"

uint32_t irq_flag;

#define PIN_LED 25
#define PIN_KEY 26

#define GPIO_LED 3
#define GPIO_KEY 2

uint32_t g_count;

int irq_gpiohs2(void* ctx)
{
    irq_flag = gpiohs_get_pin(GPIO_KEY);

    printf("IRQ The PIN is %d\n", irq_flag);

    uint32_t *tmp = (uint32_t *)(ctx);
    printf("count is %d\n", (*tmp)++);

    if (!irq_flag)
        gpiohs_set_pin(GPIO_LED, GPIO_PV_LOW);
    else
        gpiohs_set_pin(GPIO_LED, GPIO_PV_HIGH);
    return 0;
}

int main(){
#define NOFREERTOS 1

  plic_init();
  sysctl_enable_irq();

  fpioa_set_function(PIN_LED, FUNC_GPIOHS3);
  gpiohs_set_drive_mode(GPIO_LED, GPIO_DM_OUTPUT);
  gpio_pin_value_t value = GPIO_PV_HIGH;
  gpiohs_set_pin(GPIO_LED, value);

  fpioa_set_function(PIN_KEY, FUNC_GPIOHS2);
  gpiohs_set_drive_mode(GPIO_KEY, GPIO_DM_INPUT_PULL_UP);
  gpiohs_set_pin_edge(GPIO_KEY, GPIO_PE_BOTH);

  gpiohs_irq_register(GPIO_KEY, 1, irq_gpiohs2, &g_count);


  ws2812fx.init();
  ws2812fx.setBrightness(255);
  ws2812fx.setSpeed(1000);
  ws2812fx.setColor(0x007BFF);
  ws2812fx.setMode(FX_MODE_STATIC);
  ws2812fx.start();
  while(1){
      now = millis();
    
      ws2812fx.service();
    
      if(now - last_change > TIMER_MS) {
        ws2812fx.setMode((ws2812fx.getMode() + 1) % ws2812fx.getModeCount());
        last_change = now;
      }    
    }
 return 0; 
 }
}

FAQ

ArduinoCore-k210 is a very interesting software project to help all of you develop AI in an easier way. We can't guarantee that there is no any of bug. If you encounter any compatibility issues or have any new ideas, feel free to check our GitHub link and forum to communicate with us, we will try our best to solve the problems you have encountered.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].