How to get started?



  • I need your help guys.
    I bought the LoPy about 1 year ago and tinkered around with it for a while but gave up as I found other development boards easier to work with such as the ESP8266 and even the ESP32 in its early stages.
    The other day I picked it up again and fiddled around in PyMakr but had issues it with so I started looking for help in the documentation just to find that it has been discontinued. OK, so I installed Atom and the PyMakr plugin and spent two evenings trying to get Atom/Platform IO and PyMakr plugin to work consequently.
    Sometimes running the program works and sometimes the run button does nothing. The terminal says its connected but is unresponsive. Restarting Atom help sometimes. Platform IO home page doesn't load for me so I cannot start new projects (I haven't used Atom before and so far I don't really like it, it has been very unstable for me).

    How did you guys get started with the LoPy?
    I'm trying to like LoPy and I'm willing to give it some more time, but it's unfeasible for me to spend so much time setting up the environment and battling bugs. Can anyone give me some suggestions on good (updated) tutorials on how to get started.



  • @stroggo Never mind. Found it Visual Studio Code.



  • @n00bd3v said in How to get started?:

    vsc

    Hi N00bs,
    I searched for 'vsc' but can't figure out what that is? You mind explaining?
    Many are recommending the FTP way of doing it, so I'm gonna give it another try even though I would be more comfortable doing it the serial 'Arduino IDE' way.

    Thanks /W



  • Hi
    I started with vsc. It's super easy and works great. For multiple pycom devices setup simply open multiple instances. Very cool.

    After connecting with one device, do a fw update to the latest, connect via WiFi and a FTP program like filezilla. Copy flash dir to locale machine, this way you'll get a project directory template.

    Hope it helps.
    Gr
    N00bs



  • @stroggo I set my Lopy to STA mode in main.py with a fixed IP. Then it stays in my network at a know address.

    USB file transfer tools are adafruit's ampy or Dave Hyland's rshell https://github.com/dhylands/rshell, and many others (mpfshell?).

    My scripts for setting station mode is:

    import network
    import time
    from uos import uname
    # setup as a station
    wlan = network.WLAN(mode=network.WLAN.STA)
    wlan.connect(ssid="my_ssid", auth=(network.WLAN.WPA2, "my_password"))
    while not wlan.isconnected():
        time.sleep_ms(50)
    wlan.ifconfig(config=("my_fixed_ip", "255.255.255.0", "my_router",  "my_DNS"))
    print(wlan.ifconfig())
    


  • @bmarkus Oh, alright, that don't work for me, I need internet access while I code (to look up reference etc.)



  • @stroggo said in How to get started?:

    @bmarkus Thanks for you reply.
    That is the exactly the solution I'm testing now, but disconnecting from the network and connecting to the lopy every time I want to upload an updated file and then connecting to my router again is tedious. Have you found any working serial upload alternatives?

    I'm fine with WiFi ftp file transfer. I'm not connecting to my home network, only to LoPy as an AP by default.



  • @bmarkus Thanks for you reply.
    That is the exactly the solution I'm testing now, but disconnecting from the network and connecting to the lopy every time I want to upload an updated file and then connecting to my router again is tedious. Have you found any working serial upload alternatives?



  • I found Atom itself uncomfortable. PyMakr sync never worked and after a while it stopped working at all due to node.js module version mismatch for unknown reason. I dropped it. Now I'm using my laptop USB to power LoPy via an extension board and using a serial terminal (Putty) as console with the USB serial connection and transferring files with FileZilla via WiFi. Not an integrated solution but stable and works, no wasted time as with Atom.

    Please note it is just my personal opinion, others may have different view.



Pycom on Twitter