Hi hcet14,
Apologies for not seeing your Issue raised on github!
I am interested in maintaining my fork, but have been busy with other projects.
Let me look into your issue and see whether I can work out what is happening, might have to find one of the MH-Z19 sensors somewhere to try it.
Cheers,
Damien
Software serial?
-
- Posts: 15
- Joined: Mon Jun 14, 2021 12:49 am
Re: Software serial?
But working on Serial is not that difficult either.
At the start, you have said it has two ports. It has just 1 Serial Port which has two pins, one is for sending and the second one is for receiving. You will find examples in the library and you just need to connect the wires with respective pins, if you are using software serial.
The second thing to check is the baud rate, both devices must be working on the same baud rate and that's it. You can make it work in a day.
At the start, you have said it has two ports. It has just 1 Serial Port which has two pins, one is for sending and the second one is for receiving. You will find examples in the library and you just need to connect the wires with respective pins, if you are using software serial.
The second thing to check is the baud rate, both devices must be working on the same baud rate and that's it. You can make it work in a day.
Re: Software serial?
For those, who are interested may find my answer here https://github.com/dmascord/micropython ... -869021957tusker wrote: ↑Wed Jun 16, 2021 3:45 pmHi hcet14,
Apologies for not seeing your Issue raised on github!
I am interested in maintaining my fork, but have been busy with other projects.
Let me look into your issue and see whether I can work out what is happening, might have to find one of the MH-Z19 sensors somewhere to try it.
Cheers,
Damien
Thanks again, Damien
I'm a beginner with this stuff and no programmer at all.
Re: Software serial?
So @tusker, why didn't you make a pull request to the main micropython repo?
EDIT
I've managed to create a proper repo with dmascord code but with upstream set to official repo. I've merged upstream over the master and it didn't show any merge conflicts. But I haven't tested it as I'm having problems with the toolchain (I'm going to fix this tomorrow).
Repo: https://github.com/MrJake222/micropython
EDIT
I've managed to create a proper repo with dmascord code but with upstream set to official repo. I've merged upstream over the master and it didn't show any merge conflicts. But I haven't tested it as I'm having problems with the toolchain (I'm going to fix this tomorrow).
Repo: https://github.com/MrJake222/micropython
Re: Software serial?
Pull Request.
Let's vote it up!
Let's vote it up!
Re: Software serial?
Hey MicroPython Guys!
I can see you've succeeded with Software Serial on ESP32, however I would like to have Software UART ported to stm32. Searching Google and this forum I could not find a ready to use solution, so if you know of such please tell me. Otherwise I would try to do that, hopefully with your help.
I think a good starting point would be to add an STM32Cube Expansion, described in https://www.st.com/resource/en/applicat ... ronics.pdf "Application note AN4457 Implementing an emulated UART on STM32F4 microcontrollers", with associated code https://www.st.com/en/embedded-software ... 32156.html to the libraries and use ports/stm32 uart.c, machine_uart.c (and others, as DMA is also involved) as a base to modify for a software serial class in the MicroPyhton core.
I consider myself a newbie: MicroPython is new to me; my first obstacle is that I am modifying the source in a simple text editor and compiling on the command line and don't know how to debug. So, can you point me how to get out of the stone age: what IDE can I use, for instance Visual Studio Code? Can use the IDE also for debugging (I have ST-LINK v2 and BMP probes)?
Any help appreciated
tuckata
I can see you've succeeded with Software Serial on ESP32, however I would like to have Software UART ported to stm32. Searching Google and this forum I could not find a ready to use solution, so if you know of such please tell me. Otherwise I would try to do that, hopefully with your help.
I think a good starting point would be to add an STM32Cube Expansion, described in https://www.st.com/resource/en/applicat ... ronics.pdf "Application note AN4457 Implementing an emulated UART on STM32F4 microcontrollers", with associated code https://www.st.com/en/embedded-software ... 32156.html to the libraries and use ports/stm32 uart.c, machine_uart.c (and others, as DMA is also involved) as a base to modify for a software serial class in the MicroPyhton core.
I consider myself a newbie: MicroPython is new to me; my first obstacle is that I am modifying the source in a simple text editor and compiling on the command line and don't know how to debug. So, can you point me how to get out of the stone age: what IDE can I use, for instance Visual Studio Code? Can use the IDE also for debugging (I have ST-LINK v2 and BMP probes)?
Any help appreciated
tuckata
Re: Software serial?
I felt the code was a bit messy... it was functional for me and worked quickly, but not really implemented in the way that I wanted.
Obviously the work you've done to create the Pull Request tidied up the code and made it much more re-usable, so thanks!