Git Product home page Git Product logo

luanode's People

Contributors

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

luanode's Issues

chip id is not reported correctly

node.info()
flash_size=4MB, chip_id=0, heap_size=215088

Using esptool the chip id is reported:

$ esptool.py --port /dev/ttyUSB1 chip_id
esptool.py v2.2.1
...
Chip is ESP32D0WDQ6 (revision 1)
...
Chip ID: 0x9f30aea44227

Using:

  • LuaNode, version: 1.3.0
  • DOIT ESP32 DEVKIT V1 (www.doit.com) development board

KiCAD/EgaleCad footprint?

Hello,

I've just been redirected here by the Amazon seller of an ESP32 board (https://www.amazon.co.uk/gp/product/B071JR9WS9/ ). I've no idea whether they've just copied your design wholesale or whether it is an official product, but if you have any existing CAD footprints that you are able to share, that would be very much appreciated.

KiCAD is preferred, however EAGLE would also suffice.

Build Problem: Nothing to be done for FORCE

I'm trying to build for my ESP32. I've followed your wiki entry and everything worked great. But when I try to build the project with ./gen_misc.sh I'm getting a response make: Nothing to be done for FORCE .
I've edited the thre variables as mentioned. The error occures when I try to build the default wifilister or alexa_multi_esp32 app.
Thanks for your help.

Schematic and boardfile

Hi
Is it possible to share the schematic and PCB borad file? It will be great help when we use this board to extend functions with low work load.
BTW, the schematic file that shared in dropbox doesn’t work any more

node.restart() kills the USB connection

I noticed that if you call node.restart() the boot process kills the USB ->serial connection to the computer you are using to talk to Luanode. I am using a Mac running Yosemite, and tried it on several different terminal programs. Zterm, miniterm.py, picocom, they all hang when you issue an node.restart() so you have to quit the terminal program and restart it.

I am using the device /dev/cu.SLAB_USBtoUART to talk to LuaNode on the DOIT ESP-32 Dev board which comes with LuaNode already installed.

websocket client

Please make implementing a websocket client one of your priorities.

Build Error on Windows - MSYS32

I have configured the full build tool chain on windows and make is working quite okay, but not able to build LuaNode firmware.

here it is the log

/d/GitClones/EspIDF/make/component_common.mk:1: Deprecated feature: No longer necessary to include component_common.mk from /d/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/main/component.mk CC build/modules/tmr.o D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:84:2: error: unknown type name 'os_timer_t' os_timer_t os; ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:99:8: error: unknown type name 'os_timer_t' static os_timer_t rtc_timer; ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c: In function 'tmr_now': D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:157:2: warning: 'system_get_time' is deprecated [-Wdeprecated-declarations] uint32_t now = 0x7FFFFFFF & system_get_time(); ^ In file included from D:/GitClones/EspIDF/components/freertos/include/freertos/portable.h:126:0, from D:/GitClones/EspIDF/components/freertos/include/freertos/FreeRTOS.h:105, from D:/GitClones/EspIDF/components/driver/include/driver/uart.h:28, from D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/platform/include/platform.h:9, from D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:54: D:/GitClones/EspIDF/components/esp32/include/esp_system.h:96:10: note: declared here uint32_t system_get_time(void) __attribute__ ((deprecated)); ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c: In function 'tmr_register': D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:179:3: warning: implicit declaration of function 'os_timer_disarm' [-Wimplicit-function-declaration] os_timer_disarm(&tmr->os); ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:187:2: warning: implicit declaration of function 'os_timer_setfn' [-Wimplicit-function-declaration] os_timer_setfn(&tmr->os, alarm_timer_common, (void*)id); ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c: In function 'tmr_start': D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:201:3: warning: implicit declaration of function 'os_timer_arm' [-Wimplicit-function-declaration] os_timer_arm(&tmr->os, tmr->interval, tmr->mode==TIMER_MODE_AUTO); ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c: In function 'rtc_callback': D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:316:4: warning: 'system_restart' is deprecated [-Wdeprecated-declarations] system_restart(); ^ In file included from D:/GitClones/EspIDF/components/freertos/include/freertos/portable.h:126:0, from D:/GitClones/EspIDF/components/freertos/include/freertos/FreeRTOS.h:105, from D:/GitClones/EspIDF/components/driver/include/driver/uart.h:28, from D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/platform/include/platform.h:9, from D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:54: D:/GitClones/EspIDF/components/esp32/include/esp_system.h:88:6: note: declared here void system_restart(void) __attribute__ ((deprecated, noreturn)); ^ D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c: At top level: D:/GitClones/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/tmr.c:99:19: warning: 'rtc_timer' defined but not used [-Wunused-variable] static os_timer_t rtc_timer; ^ make[1]: *** [/d/GitClones/EspIDF/make/component_wrapper.mk:274: tmr.o] Error 1 make: *** [d:/GitClones/EspIDF/make/project.mk:449: component-modules-build] Error 2

Please Help me out

Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed)

Hi,
I'm quite new in using/flashing ESP32.
I've flashed the bin file from LuaNode_Esp32/firmware/ on my ESP32 dev-board.
using ESPlorer I'm trying to add a new lua file and I'm getting this error:
`
file.remove("script.lua");

Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed)
Register dump:
PC : 0x40130c50 PS : 0x00050034 A0 : 0x00040021 A1 : 0x3ffb0600
A2 : 0x00000100 A3 : 0x3ffb0630 A4 : 0x40081c94 A5 : 0x00116000
A6 : 0x00000000 A7 : 0x3ffb6754 A8 : 0x00000000 A9 : 0x40085fc8
A10 : 0x00116000 A11 : 0x00000100 A12 : 0x40081c51 A13 : 0x00000001
A14 : 0x00000aaa A15 : 0x3ffbb510 SAR : 0x0000001e EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

Backtrace: 0x40130c50:0x3ffb0600 0x00040021:0x00000000

Rebooting...
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
`
any suggestion?

HI

I got your board but I have 2x18 pins, Is possible to share schematic and some details about ADC pins?

conflicting types for 'ledc_timer_config'

When building LuaNode32, I'm getting this error:

CC pwm.o
CC periph_ctrl.o
CC ledc.o
/home/mare/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:217:11: error: conflicting types for 'ledc_timer_config'
 esp_err_t ledc_timer_config(ledc_timer_config_t* timer_conf)
           ^
In file included from /home/mare/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:22:0:
/home/mare/esp32/esp-idf/components/driver/include/driver/ledc.h:131:11: note: previous declaration of 'ledc_timer_config' was here
 esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf);
           ^
/home/mare/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:259:11: error: conflicting types for 'ledc_channel_config'
 esp_err_t ledc_channel_config(ledc_channel_config_t* ledc_conf)
           ^
In file included from /home/mare/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:22:0:
/home/mare/esp32/esp-idf/components/driver/include/driver/ledc.h:118:11: note: previous declaration of 'ledc_channel_config' was here
 esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf);
           ^
/home/mare/esp32/esp-idf/make/component_wrapper.mk:176: recipe for target 'ledc.o' failed
make[1]: *** [ledc.o] Error 1
/home/mare/esp32/esp-idf/make/project.mk:386: recipe for target 'mydriver-build' failed
make: *** [mydriver-build] Error 2

I'm doing it on Ubuntu 17.04 with nodemcu-prebuilt-toolchains

wifi config error when building.

Getting this error when trying to build Luanode32:
#error "WiFi configuration check: WARNING, WIFI_RX_BA_WIN should not be larger than WIFI_DYNAMIC_RX_BUFFER_NUM!"
I have not found a solution.

ESP-32 compiler error

implicit declaration of function 'SPIParamCfg' [-Werror=implicit-function-declaration]
SPIParamCfg (
^

Discover ESP32 using Alexa

I am trying to discover ESP32 as a smart device with Alexa. I understand I should make flash alexa_esp32 ( https://github.com/Nicholas3388/LuaNode/tree/master/LuaNode_Esp32/LuaNode32/examples/alexa_esp32 )
I observe a few issues though:

I took another approach, described here - http://esp-idf.readthedocs.io/en/latest/get-started/macos-setup.html
With this second approach, I can make flash ESP32.
Now tried building alexa_esp32 with new path variable from second approach. I could make flash it. make monitor shows continuous loop of errors.

I did change wifi SSID/password in user_config.h file
I am using MacOS and I understand the steps are depended on the OS.
Lastly, document needs to be more accurate and concise.

Thanks & Regards,
Darshil Doshi

SW_RESET Loop

I have a ESP32s:
https://www.mantech.co.za/datasheets/products/ESP-32-170468_BG.pdf

Using Arduino to flash with the slowest settings, I get a reboot loop as follows:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6412
entry 0x400806a8
ets Jun 8 2016 00:22:57

The code I loaded is:


void setup(){
    Serial.begin(115200);
    Serial.println("Test");
}
void loop(){ }

Is there something I missed?

Thanks in advance.

I2C and PWM

Hello Nicholas,

I now porting my project from ESP8266 to EST32 and notice that at the moment I can't work with PWM and i2c.
I activate the modules in main/include/user_modules.h and compiled, then I flash the ESP32, in console terminal show the libs loaded in boot, all ok so far.
But testing with LUA scripts, the PWM and i2c run without no results, and also no errors.

LUA PWM test code:

print("Test buzzer ESP32!")
gpio.mode(23,2)
pwm.setup(23, 440, 512)  
pwm.start(23)  
tmr.delay(500 * 300) 
pwm.stop(23) 

LUA i2c detection teste code:

id=0 
sda=21
scl=22

function read_reg(dev_addr, reg_addr)
     i2c.start(id)
     i2c.address(id, dev_addr ,i2c.TRANSMITTER)
     i2c.write(id,reg_addr)
     i2c.stop(id)
     i2c.start(id)
     i2c.address(id, dev_addr,i2c.RECEIVER)
     c=i2c.read(id,1)
     i2c.stop(id)
     return c
end

function find_dev(i2c_id, dev_addr)
     i2c.start(i2c_id)
     c=i2c.address(i2c_id, dev_addr ,i2c.TRANSMITTER)
     i2c.stop(i2c_id)
     return c
end

print("Scanning I2C Bus...")
i2c.setup(id,sda,scl,i2c.SLOW)
for i=0,127 do
     if find_dev(id, i)==true then
     print("Device found at address 0x"..string.format("%02X",i))
     end
end
print("Done!")

any help, comment about ?
Thank You

can not find rtc lib

lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lrtc

Building firmware compiler error: unknown type name 'os_timer_t'

/home/build/LuaNode/LuaNode_Esp32/LuaNode32/components/modules/./wifi.c:78:8: error: unknown type name 'os_timer_t'
static os_timer_t wifi_sta_status_timer;
^
Linux mike-VirtualBox 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

the sch and pcb files is lost

i click on the sch file‘s url。it tell me there is not have the sch files。and can you tell me how can i use the arduino to use this broad?

Powering ESP32 from VIN pin

MY board works perfectly when powered by USB, but when I put 5Vdc onto the VIN pin, the red led lights up but it doesn't boot (and peripherals powered on 3.3V don't receive power). I googled it and some say the 3.3V regulator needs more than 5v to function but I want to use the 5V power for other things too so I was relying on the 5V on VIN working.

I also noticed when I put 5V on VIN that the 3.3V pin also had 5V on it which seems wrong and damaging. Have I got some broken boards? (I have 3 and all three act the same).

The boards are just like the ESP32 board photos all over this repository.

Thanks!

ESP-32 compiling on Mac OSX 10.10.5

I am getting a lot of errors trying to compile the current Luanode source. I am using the current git version, and the current git version of esp-idf, and the toolchain binaries xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz

Getting several errors like:

`CC ledc.o
/Volumes/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:259:11: error: conflicting types for 'ledc_channel_config'
esp_err_t ledc_channel_config(ledc_channel_config_t* ledc_conf)
^
In file included from /Volumes/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/mydriver/./ledc.c:22:0:

/Volumes/esp32/esp-idf/components/driver/include/driver/ledc.h:118:11: note: previous declaration of 'ledc_channel_config' was here
esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf);
^
make[1]: *** [ledc.o] Error 1
make: *** [mydriver-build] Error 2
`

I fix those by adding the word const to esp_err_t ledc_channel_config(ledc_channel_config_t* ledc_conf) so it matches the version in esp-idf and the compilation proceeds.

I am currently stuck on this error and have to ask for help:

`CC flash_api.o
/Volumes/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/platform/./flash_api.c: In function 'update_flash_chip_size':

/Volumes/esp32/LuaNode/LuaNode_Esp32/LuaNode32/components/platform/./flash_api.c:34:20: error: 'esp_rom_spiflash_chip_t {aka struct }' has no member named 'deviceId'
g_rom_flashchip.deviceId,
^
make[1]: *** [flash_api.o] Error 1
make: *** [platform-build] Error 2`

BTW. Can we get the u8g module ported to Luanode? I use to use it on NodeMCU on the ESP8266 a fair bit to driver OLED displays.

Horizontal distance of mounting holes?

Hi,

In the dimension image, there are board size, the vertical distance of mounting holes.
But the horizontal distance of mounting holes is missing.

It would be great if this info is added.

nvs_open fails

When compiling using the esp-idf v2.1, I was getting an error saying that nvs_open() failed. Looks like one needs to first initialize NVS now, apparently in previous version the WiFi init did that, but no longer. So, I edited main.c and added the following include:

#include "nvs_flash.h"

and then inside of initialise_wifi() I added:

nvs_flash_init();

just before the call to tcpip_adapter_init();

where is the LuaNode-Code-Reference?

Hello,

maybe I got tomatoes on my eyes. I was not able to find a full LuaNode code-reference.
I tried some nodeMCU-commands built in LuaLoader. But they resulted in errors like

"wifi.setmode(wifi.STATION) wifi.sta.getap(function(t) if t then print("\n\nVisible Access Points:\n") for k,v in pairs(t) do l = string.format("%-10s",k) print(l.." "..v) end else print("Try again") end end)

stdin:1: attempt to call field 'getap' (a nil value)

so please give me a hint where I can find the code-reference

best regards

Stefan

Build failed with linker conflicts: dhcpserver of espconn vs lwip

The build failed for me due to linker conflicts of the dhcpserver of espconn and lwip.

I started with a fresh build environment, as described here http://esp-idf.readthedocs.io/en/latest/get-started/windows-setup.html, cloned esp-idf and LuaNode, exported the necessary PATH and IDF_PATH envvars and executed make in LuaNode32.
Here are the error messages I got

C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/lwip\liblwip.a(dhcpserver.o): In function `node_remove_from_list':
C:/msys32/home/user/esp/esp-idf/components/lwip/apps/dhcpserver.c:246: multiple definition of `node_remove_from_list'
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o):C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/espconn/dhcpserver.c:97: first defined here
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/lwip\liblwip.a(dhcpserver.o): In function `dhcps_start':
dhcpserver.c:(.text.dhcps_start+0x0): multiple definition of `dhcps_start'
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o):dhcpserver.c:(.text.dhcps_start+0x0): first defined here
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/lwip\liblwip.a(dhcpserver.o): In function `dhcps_stop':
dhcpserver.c:(.text.dhcps_stop+0x0): multiple definition of `dhcps_stop'
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o):dhcpserver.c:(.text.dhcps_stop+0x0): first defined here
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/lwip\liblwip.a(dhcpserver.o): In function `dhcps_coarse_tmr':
dhcpserver.c:(.text.dhcps_coarse_tmr+0x0): multiple definition of `dhcps_coarse_tmr'
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o):dhcpserver.c:(.text.dhcps_coarse_tmr+0x0): first defined here
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o):(.literal.parse_msg+0x14): undefined reference to `wifi_softap_set_station_info'
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/build/espconn\libespconn.a(dhcpserver.o): In function `parse_msg':
C:/msys32/home/user/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/espconn/dhcpserver.c:1045: undefined reference to `wifi_softap_set_station_info'
collect2.exe: error: ld returned 1 exit status

Any solution to fix this?

Error: conflicting types for "pthread_mutexattr_t"

Hi, I am able to build with the esp_idf, my setup is correct on 2 machines, but I got this error on both. I am missing something?

I am using xubuntu Xubuntu 16.04.2 LTS, and Antergos 17.9 (both 64bits)

In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:70:35: error: conflicting types for 'pthread_mutexattr_t' typedef struct pthread_mutex_attr pthread_mutexattr_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:457:3: note: previous declaration of 'pthread_mutexattr_t' was here } pthread_mutexattr_t; ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:80:22: error: conflicting types for 'pthread_condattr_t' typedef unsigned int pthread_condattr_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:469:3: note: previous declaration of 'pthread_condattr_t' was here } pthread_condattr_t; /* a condition attribute object */ ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:81:13: error: conflicting types for 'pthread_t' typedef int pthread_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:308:20: note: previous declaration of 'pthread_t' was here typedef __uint32_t pthread_t; /* identify a thread */ ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:82:13: error: conflicting types for 'pthread_key_t' typedef int pthread_key_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:473:20: note: previous declaration of 'pthread_key_t' was here typedef __uint32_t pthread_key_t; /* thread-specific data keys */ ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:88:29: error: conflicting types for 'pthread_cond_t' typedef struct pthread_cond pthread_cond_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:462:20: note: previous declaration of 'pthread_cond_t' was here typedef __uint32_t pthread_cond_t; /* identify a condition variable */ ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:94:29: error: conflicting types for 'pthread_once_t' typedef struct pthread_once pthread_once_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:478:3: note: previous declaration of 'pthread_once_t' was here } pthread_once_t; /* dynamic package initialization */ ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:129:29: error: conflicting types for 'pthread_attr_t' typedef struct pthread_attr pthread_attr_t; ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:363:3: note: previous declaration of 'pthread_attr_t' was here } pthread_attr_t; ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:134:0: warning: "PTHREAD_CREATE_DETACHED" redefined #define PTHREAD_CREATE_DETACHED 1 ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:322:0: note: this is the location of the previous definition #define PTHREAD_CREATE_DETACHED 0 ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:135:0: warning: "PTHREAD_CREATE_JOINABLE" redefined #define PTHREAD_CREATE_JOINABLE 2 ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:323:0: note: this is the location of the previous definition #define PTHREAD_CREATE_JOINABLE 1 ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:189:0: warning: "PTHREAD_MUTEX_NORMAL" redefined #define PTHREAD_MUTEX_NORMAL 1 ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:399:0: note: this is the location of the previous definition #define PTHREAD_MUTEX_NORMAL 0 ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:191:0: warning: "PTHREAD_MUTEX_RECURSIVE" redefined #define PTHREAD_MUTEX_RECURSIVE 3 ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:411:0: note: this is the location of the previous definition #define PTHREAD_MUTEX_RECURSIVE 1 ^ In file included from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:18:0: /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/components/pthread/include/pthreadx.h:192:0: warning: "PTHREAD_MUTEX_DEFAULT" redefined #define PTHREAD_MUTEX_DEFAULT 4 ^ In file included from /home/fak/esp/esp-idf/components/newlib/include/stdio.h:48:0, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:2: /home/fak/esp/esp-idf/components/newlib/include/sys/types.h:430:0: note: this is the location of the previous definition #define PTHREAD_MUTEX_DEFAULT 3 ^ /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c: In function 'app_main': /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:109:3: warning: 'system_restart' is deprecated [-Wdeprecated-declarations] system_restart(); ^ In file included from /home/fak/esp/esp-idf/components/freertos/include/freertos/portable.h:126:0, from /home/fak/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105, from /home/fak/esp/LuaNode/LuaNode_Esp32/LuaNode32/main/./app_main.c:4: /home/fak/esp/esp-idf/components/esp32/include/esp_system.h:88:6: note: declared here void system_restart(void) __attribute__ ((deprecated, noreturn)); ^ make[1]: *** [/home/fak/esp/esp-idf/make/component_wrapper.mk:239: app_main.o] Error 1 make: *** [/home/fak/esp/esp-idf/make/project.mk:421: component-main-build] Error 2

ask for help

D:/newespidf/nodemcu-firmware/components/platform/flash_api.c: In function 'flash_detect_size_byte':
D:/newespidf/nodemcu-firmware/components/platform/flash_api.c:50:25: error: 'ESP_PARTITION_TABLE_ADDR' undeclared (first use in this function)
const uint32_t offs = ESP_PARTITION_TABLE_ADDR;

anyone help?

Board Dimension and Pinouts

I would like to have the development kit's dimension and pin position in mm unit if possible.
I want to make some shields for the development board quickly, which will help me to be more accurate about the project i am working on.

So, where can i find the dimensions, pin positions, and pin mappings for the esp32 development board?

Run init.lua or init.lc at startup

Hello @Nicholas3388 ,

I change the "components/lua/lua.c" to run the startup lua script in boot.

Is not at 100%, but it works.
Check the diff:

@@ -20,7 +20,9 @@
 #include "my_uart.h"
 #include "rom/uart.h"
 #include "rom/ets_sys.h"
+#include <spiffs.h>

+static int dofsfile (lua_State *L, const char *name);
 char line_buffer[LUA_MAXINPUT];

 static lua_State *globalL = NULL;
@@ -213,45 +215,45 @@
   lua_remove(L, 1);  /* remove line */
   return status;
 }
-#if 0
+//#if 0
 //doit
 static void mydofile(lua_State *L)
 {
   char *fn="init.lua";
   int file_fd=-1;
-  lua_spiffs_mount();
+  //lua_spiffs_mount();

-  file_fd = SPIFFS_open(&fs,fn,SPIFFS_RDONLY,0);
+  file_fd = luaL_loadfsfile(L,fn);
   if(file_fd<0)
   {
     char *fn2 = "init.lc";
-    file_fd = SPIFFS_open(&fs,fn2,SPIFFS_RDONLY,0);
+    file_fd = luaL_loadfsfile(L,fn2);
     if(file_fd<0)
       l_message(NULL,"cannot open init.lua or init.lc");
     else
     {
-      SPIFFS_close(&fs,file_fd);
-      dofile(L,"init.lc");
+      //SPIFFS_close(&fs,file_fd);
+      dofsfile(L,"init.lc");
     }
   }
   else
   {
-     SPIFFS_close(&fs,file_fd);
-     dofile(L,"init.lua");
+     //SPIFFS_close(&fs,file_fd);
+     dofsfile(L,"init.lua");
   }
 }

 static void dotty (lua_State *L) {
   int status;
-  const char *oldprogname = progname;
+  //const char *oldprogname = progname;

-  //mydofile(L);//doit
-
+  mydofile(L);//doit
+/*
   progname = NULL;
   while ((status = loadline(L)) != -1) {
     if (status == 0) status = docall(L, 0, 0);
     report(L, status);
-    if (status == 0 && lua_gettop(L) > 0) {  /* any result to print? */
+    if (status == 0 && lua_gettop(L) > 0) {  // any result to print?
       lua_getglobal(L, "print");
       lua_insert(L, 1);
       if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0)
@@ -260,13 +262,13 @@
                                lua_tostring(L, -1)));
     }
     lua_gc(L, LUA_GCCOLLECT, 0);//doit
-  }
+  }*/
   lua_settop(L, 0);  /* clear stack */

   luai_writeline();//doit
   /*fputs("\n", stdout);
   fflush(stdout);*/
-  progname = oldprogname;
+  //progname = oldprogname;
 }


@@ -278,7 +280,7 @@
   fname = argv[n];
   if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0)
     fname = NULL;  /* stdin */
-  status = luaL_loadfile(L, fname);
+  status = luaL_loadfsfile(L, fname);
   lua_insert(L, -(narg+1));
   if (status == 0)
     status = docall(L, narg, 0);
@@ -286,7 +288,7 @@
     lua_pop(L, narg);
   return report(L, status);
 }
-#endif
+//#endif

 /* check that argument has no extra characters at the end */
 #define notail(x)      {if ((x)[2] != '\0') return -1;}
@@ -414,7 +416,7 @@
   //if (has_v) print_version();
   s->status = runargs(L, argv, (script > 0) ? script : s->argc);
   if (s->status != 0) return 0;
-#if 0
+//#if 0
   if (script)
     s->status = handle_script(L, argv, script);
   if (s->status != 0) return 0;
@@ -425,9 +427,9 @@
       print_version();
       dotty(L);
     }
-    else dofile(L, NULL);  /* executes stdin as a file */
+    else dofsfile(L, NULL);  /* executes stdin as a file */
   }
-#endif
+//#endif
   return 0;
 }

Using ESP32 Devkit 1 with Arduino IDE

Is there any documentation on how to get ESP32 Devkit 1 with Arduino IDE? I brought a few of these boards and not been able to program it using Arduino IDE. I cloned the esp32 repo from github. After I connect the board to my computer and press the "EN" button on the board, I can see the following in the Arduino IDE Serial Monitor

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2488
load:0x40078000,len:7128
load:0x40080000,len:252
entry 0x40080034
�[0;32mI (1100) cpu_start: Pro cpu up.�[0m
�[0;32mI (1100) cpu_start: Single core mode�[0m
�[0;32mI (1101) heap_alloc_caps: Initializing. RAM available for dynamic allocation:�[0m
�[0;32mI (1114) heap_alloc_caps: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM�[0m
�[0;32mI (1135) heap_alloc_caps: At 3FFB8160 len 00027EA0 (159 KiB): DRAM�[0m
�[0;32mI (1156) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM�[0m
�[0;32mI (1177) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM�[0m
�[0;32mI (1199) heap_alloc_caps: At 40093EA4 len 0000C15C (48 KiB): IRAM�[0m
�[0;32mI (1220) cpu_start: Pro cpu start user code�[0m
�[0;32mI (1279) cpu_start: Starting scheduler on PRO CPU.�[0m
Mounting flash filesystem...
mount res: 0, 0

=======================================
LuaNode: https://github.com/Nicholas3388/LuaNode
Version: 1.2.2
=======================================

load lib: base
load lib: package
load lib: table
load lib: string
load lib: gpio
load lib: pwm
load lib: node
load lib: wifi
I (1554) wifi: wifi firmware version: 224c254
I (1558) wifi: config NVS flash: enabled
I (1561) wifi: config nano formating: disabled
I (1569) wifi: Init dynamic tx buffer num: 32
I (1570) wifi: Init dynamic rx buffer num: 64
I (1574) wifi: wifi driver task: 3ffc0668, prio:23, stack:3584
I (1579) wifi: Init static rx buffer num: 10
I (1583) wifi: Init dynamic rx buffer num: 0
I (1587) wifi: Init rx ampdu len mblock:7
I (1591) wifi: Init lldesc rx ampdu entry mblock:4
I (1595) wifi: wifi power manager task: 0x3ffc5a20 prio: 21 stack: 2560
load lib: file
load lib: tmr
load lib: i2c
load lib: uart
load lib: utils
load lib: lpeg
load lib: net
load lib: thread
load lib: mqtt
load lib: nvs
other libs:
lua: cannot open init.lua

> 

But when I try to program I get an error "An error occured while trying to upload the sketch"

Can anyone point me to the documentation on how to use this board with Arduino IDE? Thanks

LuaNode incompatible with ESP-IDF >= 3.3

The code, as of 02985976f1b30036e7a294f999578bc8326eca6c, is incompatible with the latest version of the ESP-IDF framework.

I can suggest several approaches to this:

  • Updating the documentation in this repo to point to the documentation of esp-idf that it is compatible with (most likely some version in the 2.x.x branch, but found that 2.1.1 seems to be more recent)
  • Updating the master branch code base to be compatible with the most recent version of the framework
  • Creating a separate branch for each version of the framework, or at least one per major version of the framework.

I can propose changes, and create pull requests for these, if needed.
However, I am having a world of trouble getting LuaNode to build properly and talk to ESPlorer after flashing. Only got that working for a little while, and that was giving me core dumps.

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.