Need to migrate project--Please suggest

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: Need to migrate project--Please suggest

Post by kevinkk525 » Wed Jul 15, 2020 9:40 am

hmm can you use ubuntu wsl?
maybe cpython on windows doesnt have select.poll
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

bukaida
Posts: 19
Joined: Tue Jul 07, 2020 6:30 pm

Re: Need to migrate project--Please suggest

Post by bukaida » Wed Jul 15, 2020 3:18 pm

Actually planning to run it on raspberry Pi finally. Presently running the desktop version of Pi in virtual box. Since it is running on Ubuntu core, so will give it a try. Need to adjust the IP and port forwarding in VBox for WiFi connectivity. I will update the result here.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Need to migrate project--Please suggest

Post by pythoncoder » Wed Jul 15, 2020 5:01 pm

I have a long term test running at the moment where the server is running on a Pi (an ancient V1 Pi at that). I'm running the server under the Unix build of MicroPython. I haven't tried CPython 3.8 on the Pi but I have tested it on a PC in a Debian VM.
Peter Hinch
Index to my micropython libraries.

bukaida
Posts: 19
Joined: Tue Jul 07, 2020 6:30 pm

Re: Need to migrate project--Please suggest

Post by bukaida » Thu Jul 16, 2020 5:07 am

Ok, I will try ( Obviously with some help from you) on Raspibian. It will ensure the cross-platform compatibility. Windows 10 does not seem to be a good platform for this. I have no problem with that as my final target is to run it on Raspibian (which is a debian core, I think). The client is ready, only I need to have a proper platform to run the server.

When the Master developer himself is helping me, I am sure I will be able to make it work. Thanx Peter.

bukaida
Posts: 19
Joined: Tue Jul 07, 2020 6:30 pm

Re: Need to migrate project--Please suggest

Post by bukaida » Sat Jul 18, 2020 6:22 pm

Yes finally it seems running under Raspibian (Raspberry pi desktop running on Virtual box under windows 10) and forwarding the port for wifi connectivity. As per instruction I have installed python 3'8 (original was 3.5, which failed to run). The output I am getting on client is

Code: Select all

Welcome to MicroPython!                                                                                                                  
Password:                                                                                                                                
WebREPL connected                                                                                                                        
>>> import iot.examples.c_app                                                                                                            
App awaiting connection.                                                                                                                 
WiFi OK                                                                                                                                  
Connection state: True    
And on server

Code: Select all

pi@raspberry:~/Desktop/micropython-iot $ python3 -m iot.examples.s_app_cp
Awaiting connection. 8123
Client 2 Awaiting connection.
Client 4 Awaiting connection.
Client 3 Awaiting connection.
Client 1 Awaiting connection.
Got connection from client 1
Started reader
Started writer
Sent [0, 0, 0] to remote 1 

Got [16, 88, 20176] from remote 1
Sent [1, 88, 20176] to remote 1 

Got [17, 89, 20032] from remote 1
Got [17, 90, 20016] from remote 1
Sent [2, 90, 20016] to remote 1 

Got [17, 91, 20016] from remote 1
Sent [3, 91, 20016] to remote 1 

Got [17, 92, 20016] from remote 1
Sent [4, 92, 20016] to remote 1 
in an infinite loop with my blue LED blinking on ESP board.
Everything is on WiFi, connected via home router.
It was really hard for a noob like me to setup initial development environment.
If Peter confirms that the system is working as intended, then I can proceed to the original migration problem.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Need to migrate project--Please suggest

Post by pythoncoder » Sun Jul 19, 2020 8:41 am

Yes, that looks good.
Peter Hinch
Index to my micropython libraries.

bukaida
Posts: 19
Joined: Tue Jul 07, 2020 6:30 pm

Re: Need to migrate project--Please suggest

Post by bukaida » Sun Jul 19, 2020 9:11 am

@Peter, I am starting a new thread with MPU 6050 aspect and will ask lots of stupid questions. :D
I am focusing on the two projects by you, particularly one with the sensor fusion.

Post Reply