ingegno / Blockly4Arduino

Code repo of Ingegno website with Blockly for Arduino (Derivative of Blockly and BlocklyDuino)
Apache License 2.0
14 stars 6 forks source link

ESP32 support #2

Open dronecz opened 5 years ago

dronecz commented 5 years ago

Hello,

is there any plan to support ESP32 boards? We can try to implement these boards, but I did not find any info about how to add some support for boards. We, here at FabLab Brno, would like to use your games from RetroGames projects, but we feel that Arduino Nano or Uno is too old for this and we want to use modern chip with WiFi connectivity.

bmcage commented 5 years ago

You can select board NodeMCU, this is an ESP32, and the pin layout and code generated should be correct. If the pin layout is different, you can add another board, by editing

  1. blocks/arduino/component.js : add in dropdown your board. As you can see, NodeMCU is present, use that as base
  2. generators/arduino/boards.js: add your board.

However, saying that Nano or UNO are too old is mistaken. They serve a purpose. For introduction, using simpler boards is to be advised. Also, WiFi has big current drain over not using WiFi, don't use 9V battery then, or at least test current draw.

Also, the games I made are tailored for the nano. Some might start to run too fast or too slow if another processor is used. Some tweaks might be needed, patches welcome in the retrogames repo.

Finally, when adding ESP32, adding blocks for wifi connect and reconnect would be nice. It is on my todo, but up to now, workshops with children did not go into WiFi terrain.

Best of luck!

bmcage commented 5 years ago

In case you are interested, we are doing a retrogames camp this week. The latest, Dutch manual, for the children to learn working with the consoles is at https://docs.google.com/document/d/1xxyp3OQObZTlzTvthhaos_SQcoZh-0AXhmrIEuPBvQU/edit?usp=sharing The blocks should be clear to you in how we structure the camp. At the end, the children can then upload one of the classic games from the retro games console, or leave their own creation on the device.