-
Notifications
You must be signed in to change notification settings - Fork 17
Franzininho WiFi Board (ESP32-S2) #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Great to see this racing to the top of the feature list! Preparing the data for the board design: Is there any publicly available SVG drawing of the board? |
Initial version of the board is now available in wokwi/wokwi-boards. You can go ahead and load it in the simulator by following the instructions for loading a custom board. You'll be able to preview the board and draw connections, but the simulation does not work yet:
|
Thanks Uri, any results with the armel toolchain mentioned in espressif/arduino-esp32#5735 (comment) |
Sorry I didn't see the question, but we love the svg created by Ariella. |
Yes, positive results! I just added a comment there |
Some more updates: working to get the ESP32-S2 simulator to a usable state, then integrate it with Wokwi. So far, was able to get MicroPython 1.17 prompt:
So this is a good sign. It means that the following peripherals are working correctly:
There's still much work to do before it'll be usable:
And probably a bunch of other things we'll discover along the way :-) |
What great news Uri, there really is a lot of work to be done! If you need, I can go testing and validating with Franzininho WiFi hardware. Very good to know about was able to get MicroPython, Franzininho WiFi now has official support for CircuitPython, I believe we will explore this feature a lot. :-) |
Excellent! CircuitPython will probably be another stage, first let's get the Arduino stuff to work! |
Progress update: GPIO is functional! So as soon as the Arduino-ESP32 issue will be resolved, we'll be able to close the loop and have Blink working. I'm now starting to work on USB, which will enable CircuitPython (as well as easier output from the Arduino Core). |
Video showing CircuitPython work-in-progress: https://twitter.com/WokwiMakes/status/1449804926478168068 |
Now you can try it yourself! Find the complete instructions here: https://wokwi.com/arduino/projects/313606939786347074 |
Update: NeoPixel also works now! To try, paste the following code in the CircuitPython REPL: import board
import neopixel_write
import digitalio
pin = digitalio.DigitalInOut(board.NEOPIXEL)
pin.direction = digitalio.Direction.OUTPUT
green = bytearray([255, 0, 0])
neopixel_write.neopixel_write(pin, green) |
Update: you can now run the Franzininho WiFi CircuitPython Demo Project out of the box, without any special instructions. I hope the Arduino Core issue gets fixed soon, and so we'll also have a set of demos with Arduino. |
Very good, doing some tests with CircuitPython, a question, is time.sleep already implemented? This is the code I'm testing: """ Hello, World! (Blink LED)"""
import board
import time
from digitalio import DigitalInOut, Direction
# Setting the LED pin, the LED I configured was pin 4 = IO4
led = DigitalInOut(board.IO4)
led.direction = Direction.OUTPUT
# infinite loop - always running
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5) Diagram link: https://wokwi.com/arduino/projects/314165931402068544 |
The led is always ON |
Yes, it seems like the internal timer is going way too fast, so the sleep finishes immediately. I'll try to figure out why this happens |
Sleep fixed! |
Progress update: Filesystem works! You can try it here: https://wokwi.com/arduino/projects/313606939786347074 Note that the code still doesn't run automatically (CP starts in Safe mode, I still have to figure out how to avoid this), so you have to manually load it from the REPL: import code |
espressif/arduino-esp32#5735 fixed! Meaning you can now enjoy: There's still some issue with the USB Serial output on Arduino Core, I have to debug it and figure out why it doesn't print any output. But other than that, it's pretty usable :) |
Thanks Uri, good to hear that espressif fixed this! everyone is to be congratulated 😉 |
USB Serial on Arduino core works! Example: https://wokwi.com/arduino/projects/316092312585241154 So the Arduino core is pretty much complete. Let's see what people build with it. Over the next few days, I'll add the Franzininho WiFi to the "new project" menu, documentation, etc. so it'll become generally available. My next action item here is to make CircuitPython load the user code when the simulation starts. |
Forgot to say - also added an automated test case for Franzininiho WiFi simulation: https://github.com/wokwi/wokwi-tests/tree/master/franzininho-wifi/usb-serial |
Thanks Uri, I'll share it in the community and try it out! |
Some updates: I implemented a bunch of performance speedups (similar to the ones I did for the ESP32), and now the ESP32-S2 simulation runs about 4 times faster. Getting the WiFi to work is still a big challenge - I'll keep update here as I slowly make progress. |
That's great Uri, it's already a huge improvement! In my tests I've already noticed the improvement in speed ;)
All right, but that's already a big step forward! I'll do more tests! Thanks |
Good news: the WiFi is working! Examples:
Note: TLS support isn't there yet. We'll need to implement the crypto hardware accelerators - SHA, AES, RSA and possibly a few more before TLS/HTTPS will be functional. Similar to what we did in #267. |
That's great! I will share it with the community! Thanks |
Progress update: HTTPS is now working on Arduino Core! I made a quick example that fetches jokes from an online REST API and displays them on an LCD screen: https://wokwi.com/arduino/projects/324148356078109268 I've finished the AES/SHA accelerators. Once I finish the RSA accelerator, I hope we'll also get HTTPS on CircuitPython. |
@urish Is it possible to send printf output to serial monitor using ESP-IDF like ESP32 devkit v1? |
@arcostasi yes - but you need to adjust the connection in diagram.json to read:
(instead of TX0 / RX0) |
Thanks Uri, printf() is working perfectly! :) |
Excellent! What do you think is still missing before we can release the Franzininho WiFi board? |
I will do more tests today and give feedback! for now it's ok |
Thank you! From my end: need to create a documentation page, add it to the list of "New project" options, create some basic examples (perhaps we can use the examples that you created?) Nice-to-have: Finish CircuitPython support (so it won't start in Safe mode); MicroPython support |
Feel free to use my examples! I will create more examples during my tests.
Yes, I believe CircuitPython will be used more by the Franzininho community. Thanks Uri |
@urish, I'm testing the inputs, in your example of the piano with Franzininho WiFi, when I release a key and press another the input doesn't respond, I need to press it again to hear the buzzer. |
Thanks @arcostasi! Can you connect the logic analyzer and check if the data is fed in (but not played but the speaker) or if it skips feeding in the data? On a different note - worked on CircuitPython today. It now runs your code automatically: https://wokwi.com/arduino/projects/313606939786347074 However, there's one annoying thing: you don't see all the output immediately, as it takes a few microseconds for the USB to connect. This means that if you have a syntax error in your code, you'll need to press "Ctrl+D" to see it. |
Hi @urish, apparently with the logic analyzer it's normal! I pressed 3 times alternately between the red and orange button and I did not hear the speaker, when I pressed 2 times on the same button without alternating I can hear the speaker. |
Thanks! Can you please also connect the speaker pin to the logic analyzer? |
That is great! as soon as I have some free time I'll have fun with CircuitPython. |
Thanks! So I suspect an issue with the buzzer. Does the frequency of the square wave look correct? (you can ask PulseView to calculate the frequency by holding Shift and selecting the region between two adjacent peaks (low-to-high transitions). Also, do you observe any difference when the buzzer is set to accurate mode? |
Thanks @arcostasi. I think I found the issue with the smooth mode - it looked at edge-to-edge time instead of peak-to-peak time to determine the frequency. The ESP32 uses a non-50% duty cycle, so it confused the smooth mode algorithm: You can see that the frequency is right, but the duty cycle (% of the time the signal is high in each cycle) is not 50%. This is different from how Arduino does PWM. I have updated the algorithm, can you give it another go please? |
Hi @urish, it worked perfectly now! Thank you |
@urish, I did another test with Franzininho WiFi, was the analog reading implemented? Thanks Here is an example: RGB LED with Slide Potentiometer |
As far as I can tell not yet |
Ok, no problem! Thank you |
Update: analogRead (ADC) implemented! |
Thanks @urish, worked perfectly! |
Here's an example of using a servo with Franzininho WiFi |
Documentation for the Franzininho WiFi board: https://docs.wokwi.com/parts/board-franzininho-wifi |
The last missing feature is now ready: SPI support. Here's a quick demo: https://wokwi.com/projects/329013233501340242 So now we have feature parity with the ESP32 and can declare the Franzininho WiFi simulation ready. Thanks for everyone who supported this feature :-) |
Franziniho WiFi now has a "New project" page: https://wokwi.com/projects/new/franzininho-wifi |
Franzininho WiFi Board is a development board to evaluate ESP32-S2 Modules (Wroom and Wrover) and develop the new generation of Franzininho Boards. The Franzininho project was created to develop skills in people in the areas of electronics and programming, through activities in the DIY format and in conjunction with maker culture in Brazil.
Project: https://github.com/Franzininho/Franzininho-WIFI
The project is an open-source hardware and is available on CERN open hardware license.
The Franzininho WiFi board is certified in OSHWA: UID BR000006
The text was updated successfully, but these errors were encountered: