Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Wipy 3 issues

    Scheduled Pinned Locked Moved WiPy 2&3
    boot.pyheartbeat
    4 Posts 2 Posters 738 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jmpratt
      last edited by

      My WiPy 2 just died so I'm trying to get my WiPy 3 up and running out of the box. Did the firmware upgrade so now it executes boot.py and connects to my network. Now the heartbeat LED is False after boot.py runs. I thought that was weird so I explicitly set heartbeat(true) in boot.py but it won't flash. From the REPL, it shows heartbeat(false). Any ideas what is causing the heartbeat to go false? Main.py is the default, blank version. Here's my boot.py:

      # boot.py -- run on boot-up
      # can run arbitrary Python, but best to keep it minimal
      #
      import network
      import machine
      from machine import SD
      from machine import UART
      from network import WLAN
      import os
      import time
      import pycom
      
      pycom.heartbeat(True)
      #
      # Set up WLAN
      #
      wlan = WLAN() # get current object, without changing the mode
      
      ssid     = 'Mynet'
      password = 'xxxxxxx'
      ip       = '192.168.1.50'
      net_mask = '255.255.255.0'
      gateway  = '192.168.1.1'
      dns      = '192.168.1.1'
      
      
      uart = UART(0, 115200)
      os.dupterm(uart)
      
      def init():
          wlan = WLAN(mode=WLAN.STA)
          wlan.ifconfig(config=(ip, net_mask, gateway, dns))
      
      def connect():
          wlan.connect(ssid, auth=(WLAN.WPA2, password), timeout=5000)
          while not wlan.isconnected():
              machine.idle() # save power while waiting
          cfg = wlan.ifconfig()
          print('WLAN connected ip {} gateway {}'.format(cfg[0], cfg[2]))
      
      def set():
          init()
          if not wlan.isconnected():
              connect()
      
      set()
      #
      # Set up server
      #
      #server = network.Server()
      #server.deinit()
      #server.init(login=('YOUR_USERNAME','YOUR_PASSWORD'),timeout=600)
      #
      # SD card support
      #
      sd = SD()
      os.mount(sd, '/sd')
      
      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @jmpratt
        last edited by

        @jmpratt I anything connected to P2?

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jmpratt @robert-hh
          last edited by

          @robert-hh nope. Just sitting in an expansion board 2.0. nothing connected.

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @jmpratt
            last edited by

            @jmpratt Since there is no configuration data on a WiPy that could get lost, you could try to make a complete erase using esptool.py and then reload the firmware.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom