All Projects → mruby-esp32 → mruby-esp32

mruby-esp32 / mruby-esp32

Licence: MIT license
mruby application template for ESP32

Programming Languages

ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to mruby-esp32

hapi
Hydro­ponic Automa­tion Plat­form Ini­tia­tive (HAPI)
Stars: ✭ 65 (-19.75%)
Mutual labels:  esp32
gfx demo
GFX Demo for Arduino and the ESP-IDF
Stars: ✭ 63 (-22.22%)
Mutual labels:  esp32
stewart-platform-esp32
https://ouilogique.com/plateforme-de-stewart-esp32/
Stars: ✭ 17 (-79.01%)
Mutual labels:  esp32
esp-idf-parallel-tft
8bit parallel TFT & 4-line resistance touch screen Driver for esp-idf using i2s paralell mode
Stars: ✭ 45 (-44.44%)
Mutual labels:  esp32
SMLReader
ESP8266 based smart meter (SML) to MQTT gateway
Stars: ✭ 170 (+109.88%)
Mutual labels:  esp32
M5Unified
Unified library for M5Stack series
Stars: ✭ 73 (-9.88%)
Mutual labels:  esp32
esp32-ota-with-ble-setup
No description or website provided.
Stars: ✭ 46 (-43.21%)
Mutual labels:  esp32
OneWire
Library for Dallas/Maxim 1-Wire Chips
Stars: ✭ 32 (-60.49%)
Mutual labels:  esp32
esp32-i2s-mems
Using an I2S MEMS microphone on an ESP32
Stars: ✭ 103 (+27.16%)
Mutual labels:  esp32
esp-insights
ESP Insights: A remote diagnostics/observability framework for connected devices
Stars: ✭ 31 (-61.73%)
Mutual labels:  esp32
Low power TTGO T-beam
Low power consumption for TTGO t-beam
Stars: ✭ 45 (-44.44%)
Mutual labels:  esp32
esp32-epaper-display
Server and software to use an ESP32 as a connected display
Stars: ✭ 73 (-9.88%)
Mutual labels:  esp32
LMIC-node
LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node qu…
Stars: ✭ 108 (+33.33%)
Mutual labels:  esp32
Wordclock
Diy Wordclock with an esp32 and ws2812b Leds
Stars: ✭ 19 (-76.54%)
Mutual labels:  esp32
esp32-e-paper-weatherdisplay
An ESP32 and 4.2" ePaper Display reads Dark Sky weather API and displays the weather using ESP-IDF
Stars: ✭ 110 (+35.8%)
Mutual labels:  esp32
ESP32-USB-Soft-Host
An Arduino wrapper to @sdima1357's usb_soft_host esp-idf example
Stars: ✭ 119 (+46.91%)
Mutual labels:  esp32
esp32-iot-uno
ESP32 iot uno board
Stars: ✭ 47 (-41.98%)
Mutual labels:  esp32
OctoWifi-LEDs-Controller
LEDs driver for ESP32 ( support ART-NET, RGB888, RGB565, Z888 )
Stars: ✭ 16 (-80.25%)
Mutual labels:  esp32
blynk-library-lua
Blynk library for Lua. Works with Lua 5.1+, LuaJIT, NodeMCU.
Stars: ✭ 35 (-56.79%)
Mutual labels:  esp32
openblock-desktop
Graphic programming software for hardware like: arduino, microbit, esp32, esp8266...
Stars: ✭ 161 (+98.77%)
Mutual labels:  esp32

Example of mruby on the ESP32

Before you get started you will need to follow the setup documentation from the esp-idf project for your specific operating system.

I have only tested this on macOS and using a certain version of esp-idf. You should try to use more recent version if you have failed.

You will need to recursively clone this project with the recursive flag because it includes mruby as a submodule:

git clone --recursive https://github.com/mruby-esp32/mruby-esp32.git

The main ruby program can be found in the main/simplest_mrb.rb file. The makefile configuration in main/component.mk and the main entry point source file mruby_main.c will also be of interest if you want to change the name of the ruby script. The examples included are very simple scripts that only print to the ESP32's debug console.

I'm assuming you have followed all the steps in the install documentation and are at least somewhat familiar with the building steps. With that in mind you can do something like the following and see the example running:

make menuconfig
make MRUBY_EXAMPLE=simplest_mrb.rb
make MRUBY_EXAMPLE=simplest_mrb.rb flash monitor

The flag MRUBY_EXAMPLE can be replaced with one of the following:

  • simplest_mrb.rb - Simply prints two strings
  • wifi_example_mrb.rb - An example of connecting to WiFi, you will need to modify this file to include your SSID and password
  • system_mrb.rb - Examples of most of the system APIs

wifi_example_mrb.rb stack overflow

If you experience a stack overflow during execution of the WiFi example, please adjust the stack size on file main/mruby_main.c from 8192 to 32768.

void app_main()
{
  nvs_flash_init();
  xTaskCreate(&mruby_task, "mruby_task", 32768, NULL, 5, NULL);
}

Also adjust the configured stack size using make menuconfig from the default one (which may be either 2048 or 4096) to 32768.

make menuconfig
Component config ---> ESP32-specific ---> Event loop task stack size

References: Issue #11 and mruby-esp32/mruby-socket


The clean command will clean both the ESP32 build and the mruby build:

make clean

There are multiple GEMS that can be turned on and off via the mruby configuration file found in components/mruby_component/esp32_build_config.rb:

  • mruby-esp32-system - ESP32 system calls
  • mruby-esp32-wifi - ESP32 WiFi
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].