whitecatboard / whitecat-ide

The Whitecat IDE, to program the ecosystem in Blocks or Lua
41 stars 18 forks source link

connecting to esp32 board #1

Closed loboris closed 7 years ago

loboris commented 7 years ago

I'm trying to connect to ESP32 board (SparkFun ESP32 Thing) with Lua RTOS for ESP32, but with no success. blockly-environment installed on Google Chrome (as application). Tested on Linux (Ubuntu 16.10) and Windows 10. The board itself works, tested with minicom on Ubuntu.

jolivepetrus commented 7 years ago

Please, send me the device name for your UART connection when you connect your board:

/dev/ttyXXXXXXX .....

loboris commented 7 years ago

/dev/ttyUSB0

jevers76 commented 7 years ago

Were you able to get your ESP32 Thing connected to the blocky-environment? I am trying to do so also, but from windows 8.1. The thing is using a FTDI usb to serial converter.

jolivepetrus commented 7 years ago

This project is being migrated to nw.js because Chrome Apps will be discontinued by google in 2017 (see https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html).

I hope that source code will be available by the end of this week in this repository.

Thanks for your patience.

jolivepetrus commented 7 years ago

First version for nw.js version is available for windows and mac on this repository.

Please, read https://github.com/whitecatboard/blockly-environment/wiki/First-Steps for instructions.

Adapter information for "CP210x USB to UART Bridge Controller" is available in this version. This corresponds to the adapter present in our test board. We don't have any ESP32 Thing for test.

If you can't connect your board to the blockly environment follow the following instructions:

In app menu you have Settings --> Adapters:

If works, please send to us the adapter configuration.

NOTE:

The Blockly Environment needs a board with a Lua RTOS firmware, and the serial adapter connected to the DTS and RTS lines.

loboris commented 7 years ago

In Windows I can connect to the board (ESP32 Thing), but only first time after flashing if the board stays in bootloader. ESP32 Thing has DTR connected to CHIP_PU (rst/en) not DTS, same as on ESP32-DEVC (!), RTS is connected to IO0. esp32-thing-schematic.pdf FTDI adapter: Device Name "USB Serial Port", port: COM3

Under Linux, I can't connet to the port, even the first time after flashing. Device Name: "FT231X_USB_UART", port: "/dev/ttyUSB0"

jolivepetrus commented 7 years ago

Thanks for the schematic. There are an error in my last comment: the board need to have the serial adapter connected to the DTR and RTS lines (not DTR and DTS).

Please, try the following:

We are analyzing a method to perform a boar reset based on the board configuration, and preserve the plug & play method (We do not want the programmer to have to select the board type).

jolivepetrus commented 7 years ago

Please, retry with this commit (https://github.com/whitecatboard/blockly-environment/commit/0714b70ab71e9c9d5c7971a4893deae2ad225797).

I have tried to buy a ESP32 thing, but is out of stock!

:(

jevers76 commented 7 years ago

I am able to connect to my ESP32 Thing using the instructions above. I am so new to I am trying out what to do next. Thanks

loboris commented 7 years ago

I can confirm that I can connect To my ESP32 Thing with the latest commit. Tested under Linux. I get one error on start: [23261:23261:0110/083848:ERROR:desktop_window_tree_host_x11.cc(1131)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType) but everything works. I haven't built the app, started with nw ./src

jolivepetrus commented 7 years ago

Yes, when you start with nw ./src, some errors are prompt to the console. This errors com from the Blockly's core implementation.

We have plans for upgrade to last Blockly version in the next weeks.

jolivepetrus commented 7 years ago

Hi @loboris,

The Whitecat IDE is now available on the web in alpha version. For windows you need:

Yo have 2 programming models: blocks or lua. If you are in blocks you can switch to Lua pressing the ";" button in the toolbar. If you want switch to blocks press the "puzzle" button in the toolbar.

In the next weeks we have plans for document all and create the wiki!

Best regards,

Jaume