• GPY rogue safe mode reboots

    19
    0 Votes
    19 Posts
    1k Views
    K
    @robert-hh Not seeing evidence of a corrupted file system Robert, all nvs.sets and error.log files are OK. Just boot.py & main.py have been rebuilt to the 'put-your-code here defaults'. Might actually skip the imports & simply have 2 independent copies of the user code at boot.py & main.py Just checked the code, we don't actually close files, we use 'with open' which does not require file closure. Is that OK? What if I'm wrong & boot.py & main.py have been rebuilt due file system corruption. Is there a way of dealing with this?
  • Servo Motor Issues

    2
    0 Votes
    2 Posts
    237 Views
    shanefowler25S
    I solved my own problem, I realized the frequency was too high and that the duty cycle should be between 5 and 10 percent. I used Sparkfun's PWM page to help me get this information and solve my issue. The link is here: https://learn.sparkfun.com/tutorials/pulse-width-modulation/all Also my code is here for anyone who may run into the same issue with a servo motor: from machine import PWM from time import sleep pwm = PWM(0,frequency=50) # use PWM timer 0, with a frequency of 50Hz pwm_c = pwm.channel(0,pin='P8', duty_cycle=1) while True: pwm_c.duty_cycle(0.097) sleep(1) pwm_c.duty_cycle(0.043) sleep(1) pwm_c.duty_cycle(0.097)
  • Can't get my GPy to work

    2
    0 Votes
    2 Posts
    258 Views
    robert-hhR
    @Alonso21 This is a little bit vague. Please tell us the firmware version you are using. You get that, when you push Ctrl-B in the REPL prompt (= terminal window) of the device. Also please tell us the LTE modem firmware version. You will get that by typing (or pasting) these three commands at the REPL prompt: from network import LTE lte=LTE() print(lte.send_at_cmd('AT!="showVersion"')) And please tell us, which software you try to use. Did you have a look at the examples in the pycom documentation? https://docs.pycom.io/tutorials/lte/
  • Warning To All Visual Studio Code / Pymakr Extension Users

    2
    1 Votes
    2 Posts
    317 Views
    T
    Another issue with Pymakr was discovered yesterday. If you install Visual Studio Code on a newly installed Windows 10 and add the Pymakr extension, it will not communicate with the GPy until Node is also installed on the computer.
  • Calling machine.reset from timer interrupt routine

    8
    0 Votes
    8 Posts
    715 Views
    T
    I think we have discovered the problem with our code! I was initializing a global variable by calling the constructor but the constructor would throw an exception (very rarely). lte = LTE() Since there was no try/except around the global code and since the watchdog had not been initialized yet, the exception would break the startup code from running and freeze the system. The lesson learned is NEVER put any code in the global variable declarations that might throw an exception! lte = None ##################################################################### # Reset Modem ##################################################################### def reset_modem(): global lte g.modem_state = g.MS_RESET_MODEM log("reset modem...") if lte == None: try: lte = LTE() except Exception as ex: sys.print_exception(ex) util.reset(27, "LTE exception") sleep_ms(0) lte.reset() sleep_ms(0)
  • GPY pin voltage tolerance

    3
    0 Votes
    3 Posts
    394 Views
    shanefowler25S
    @robert-hh Thank you for the response! I'm going to buy a level shifter from sparkfun and use that for my project. Hopefully that works out for what I'm trying to do and doesn't damage the board.
  • Is it possible to program the GPy without the expansion board?

    3
    1 Votes
    3 Posts
    348 Views
    R
    @Dinali_S Here is GPy Pinout Diagram
  • CAT-M1 cannot Attached

    2
    0 Votes
    2 Posts
    277 Views
    robert-hhR
    @Terry666 Can you try to set the timeout to a much larger value? For the first time, that may be needed.
  • LTE-M stability

    1
    0 Votes
    1 Posts
    228 Views
    No one has replied
  • lte OSError

    gpy oserror
    1
    0 Votes
    1 Posts
    220 Views
    No one has replied
  • at cmds Vs the alternative

    at commands gpy
    4
    0 Votes
    4 Posts
    420 Views
    robert-hhR
    @kjm That value is #defined in esp32/lte/lteppp.h, and the constant is used e.g. in esp32/mods/modlte.c.
  • Locals Vs Globals

    code
    3
    0 Votes
    3 Posts
    312 Views
    K
    long sigh
  • OTA LTE modem update

    2
    0 Votes
    2 Posts
    263 Views
    N
    @DonovanBlackLab The documentation is a bit vague. After a lot of trials, I was able to upgrade firmware from the module's flash over wifi (no UART, no SD). I copied one of the diff file into the /flash over ftp (I used FileZilla GUI Client). And in the micropython REPL execute following code: import sqnsupgrade sqnsupgrade.run('/flash/diff_file') You should copy the diff file based on your current modem firmware version which you can check with, sqnsupgrade.info()
  • Dead modem

    gpy dead lte no attachment
    7
    0 Votes
    7 Posts
    711 Views
    K
    @rskoniec Mate I'm paddling hard to keep my head above water with the continual state of pycom/sequans firmware flux without trying to follow up on a single failed piece of hardware. Typical of most hybrids I reckon the RF wafer is probably heaps more fragile than the digital stuff & a glitch down the antenna feedline or on the 5v rail has cooked it. Probably the only disadvantage of having the lte integrated with the smarts on the same board.
  • Is Rollback possible?

    7
    0 Votes
    7 Posts
    692 Views
    D
    Thanks @kjm : A rollback to Atom 1.38.2 solved the issue.
  • lte attachment

    gpy lte attachment
    4
    0 Votes
    4 Posts
    466 Views
    K
    @hayesey import network, machine wdt=machine.WDT(timeout 60000) #allow 60s per deepsleep cycle if 'lte' not in globals(): lte=network.lte() #new modem instance if previous is gone cause=machine.reset_cause() #check if previous cycle ended via watchdog if cause==2: lte.send_at_cmd('AT^RESET') #reset the modem if it did
  • Keyboard input

    gpy keyboard input
    3
    0 Votes
    3 Posts
    405 Views
    R
    @kjm I've just tested it through the REPL (PuTTY on COM with W10) on my LoPy and everything is OK: >>> os.uname() (sysname='LoPy', nodename='LoPy', release='1.20.0.rc11', version='v1.9.4-0a38f88 on 2019-05-14', machine='LoPy with ESP32', lorawan='1.0.2') >>> >>> v=input('Enter value -=> ') Enter value -=> test msg >>> >>> print(v) test msg >>>
  • SMS abstraction

    gpy sms
    3
    0 Votes
    3 Posts
    309 Views
    K
    Nice one Rob, tnx
  • Read input voltage via code?

    3
    0 Votes
    3 Posts
    372 Views
    techykermitT
    @robert-hh Thanks! :)
  • gpy modem upgrade alternative

    gpy modem upgrade
    2
    1 Votes
    2 Posts
    320 Views
    robert-hhR
    @kjm For people using Atom the this is a possible approach. But not all people do, and this approach makes quite a few assumptions, like that the image fits into flash. And there a lot if threads about problems with Atom and syncing. Your approach is an alternative, but people will too have issues with it.

Pycom on Twitter