• Coredump Location

    coredump gpy python
    1
    0 Votes
    1 Posts
    372 Views
    No one has replied
  • Pytrack GPS library

    pytrack gps library gps pytrack
    11
    0 Votes
    11 Posts
    2k Views
    G
    @tttadam Hi. Looks like you might have found my L76micropyGPS.py useful. Any feedback welcome! I just updated the doco as the issue has been resolved, and I had not updated the README.
  • 1 Votes
    7 Posts
    3k Views
    B
    @meven What you advised: "python -m pip install pycom" is working for me also, thank you However next, I got this error: "[pylint] E1101:Module 'pycom' has no 'heartbeat' member" but I could ignore it by: # pylint: disable=maybe-no-member pycom.heartbeat(False) pycom.rgbled(0xffff00)
  • Running a small 3v pump

    help
    8
    0 Votes
    8 Posts
    845 Views
    tobzT
    Thanks everyone I'll figure out how to put your feedback into place :)
  • .py .mpy python cache?

    wipy oem upgrade
    5
    1 Votes
    5 Posts
    710 Views
    T
    @robert-hh ah yes, exactly, in the 16 second time of startup i read some file: planning.txt for see if startup is needed for the device, wifi_name.txt for the device SSID etc... Not all for the code loading!
  • WIPY OEM antenna EXT or INT?

    wipy oem wifi antenna
    6
    0 Votes
    6 Posts
    789 Views
    robert-hhR
    @thibault The antenna selection does not matter at all, because the W01 has just one antenna port which will used in any case.
  • Frozen modules for my Sipy (Solved)

    frozen modules firmware encrypt code
    9
    0 Votes
    9 Posts
    1k Views
    nespressifN
    @cmisztur Editing pycom-micropython-sigfox/esp32/pycom_version.h you can change the version, but I don't know how to change the name and the other parameters returned by uos.uname(). I'm sorry. Regards,
  • First use on MacOS & Serial doesn't work

    micropython setup macos mac
    3
    0 Votes
    3 Posts
    653 Views
    D
    Woo Hoo!! πŸ™πŸΌπŸ’ƒπŸ½πŸ’₯πŸŽ‰πŸŽ‰ Thanks, I guess I assumed that the expansion board was just the drivers for an onboard serial port. Next time, I'll look at the schematics as well, since the WiPy docs said that there wasn't any driver needed for use. It's all working, now I can geek out having combined my two favorite worlds... embedded systems and Python!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    25 Views
    No one has replied
  • FFI Lib module not found

    modules lib micropython
    3
    0 Votes
    3 Posts
    673 Views
    S
    Thank you for the answer. I want to adapt this raspberrypi script to my Pycom WiPy. but I stuck ... :-( #!/usr/bin/python import io # used to create file streams import fcntl # used to access I2C parameters like addresses import time # used for sleep delay and timestamps import string # helps parse strings class AtlasI2C: long_timeout = 1.5 # the timeout needed to query readings and calibrations short_timeout = .5 # timeout for regular commands default_bus = 1 # the default bus for I2C on the newer Raspberry Pis, certain older boards use bus 0 default_address = 98 # the default address for the sensor current_addr = default_address def __init__(self, address=default_address, bus=default_bus): # open two file streams, one for reading and one for writing # the specific I2C channel is selected with bus # it is usually 1, except for older revisions where its 0 # wb and rb indicate binary read and write self.file_read = io.open("/dev/i2c-"+str(bus), "rb", buffering=0) self.file_write = io.open("/dev/i2c-"+str(bus), "wb", buffering=0) # initializes I2C to either a user specified or default address self.set_i2c_address(address) def set_i2c_address(self, addr): # set the I2C communications to the slave specified by the address # The commands for I2C dev using the ioctl functions are specified in # the i2c-dev.h file from i2c-tools I2C_SLAVE = 0x703 fcntl.ioctl(self.file_read, I2C_SLAVE, addr) fcntl.ioctl(self.file_write, I2C_SLAVE, addr) self.current_addr = addr def write(self, cmd): # appends the null character and sends the string over I2C cmd += "\00" self.file_write.write(cmd) def read(self, num_of_bytes=31): # reads a specified number of bytes from I2C, then parses and displays the result res = self.file_read.read(num_of_bytes) # read from the board response = filter(lambda x: x != '\x00', res) # remove the null characters to get the response if ord(response[0]) == 1: # if the response isn't an error # change MSB to 0 for all received characters except the first and get a list of characters char_list = map(lambda x: chr(ord(x) & ~0x80), list(response[1:])) # NOTE: having to change the MSB to 0 is a glitch in the raspberry pi, and you shouldn't have to do this! return "Command succeeded " + ''.join(char_list) # convert the char list to a string and returns it else: return "Error " + str(ord(response[0])) def query(self, string): # write a command to the board, wait the correct timeout, and read the response self.write(string) # the read and calibration commands require a longer timeout if((string.upper().startswith("R")) or (string.upper().startswith("CAL"))): time.sleep(self.long_timeout) elif string.upper().startswith("SLEEP"): return "sleep mode" else: time.sleep(self.short_timeout) return self.read() def close(self): self.file_read.close() self.file_write.close() def list_i2c_devices(self): prev_addr = self.current_addr # save the current address so we can restore it after i2c_devices = [] for i in range (0,128): try: self.set_i2c_address(i) self.read() i2c_devices.append(i) except IOError: pass self.set_i2c_address(prev_addr) # restore the address we were using return i2c_devices def main(): device = AtlasI2C() # creates the I2C port object, specify the address or bus if necessary print(">> Atlas Scientific sample code") print(">> Any commands entered are passed to the board via I2C except:") print(">> List_addr lists the available I2C addresses.") print(">> Address,xx changes the I2C address the Raspberry Pi communicates with.") print(">> Poll,xx.x command continuously polls the board every xx.x seconds") print(" where xx.x is longer than the %0.2f second timeout." % AtlasI2C.long_timeout) print(">> Pressing ctrl-c will stop the polling") # main loop while True: input = raw_input("Enter command: ") if input.upper().startswith("LIST_ADDR"): devices = device.list_i2c_devices() for i in range(len (devices)): print devices[i] # address command lets you change which address the Raspberry Pi will poll elif input.upper().startswith("ADDRESS"): addr = int(string.split(input, ',')[1]) device.set_i2c_address(addr) print("I2C address set to " + str(addr)) # continuous polling command automatically polls the board elif input.upper().startswith("POLL"): delaytime = float(string.split(input, ',')[1]) # check for polling time being too short, change it to the minimum timeout if too short if delaytime < AtlasI2C.long_timeout: print("Polling time is shorter than timeout, setting polling time to %0.2f" % AtlasI2C.long_timeout) delaytime = AtlasI2C.long_timeout # get the information of the board you're polling info = string.split(device.query("I"), ",")[1] print("Polling %s sensor every %0.2f seconds, press ctrl-c to stop polling" % (info, delaytime)) try: while True: print(device.query("R")) time.sleep(delaytime - AtlasI2C.long_timeout) except KeyboardInterrupt: # catches the ctrl-c command, which breaks the loop above print("Continuous polling stopped") # if not a special keyword, pass commands straight to board else: if len(input) == 0: print "Please input valid command." else: try: print(device.query(input)) except IOError: print("Query failed \n - Address may be invalid, use List_addr command to see available addresses") if __name__ == '__main__': main()
  • Password Protection

    security
    3
    0 Votes
    3 Posts
    611 Views
    S
    @robert-hh Very good information! Thanks very much for your help!
  • Light sleep (firmware >= 1.19)

    light sleep
    4
    0 Votes
    4 Posts
    763 Views
    rcolisteteR
    Small issue : how to use "machine.pin_sleep_wakeup()" to wake up from light sleep, then disable it (how ?) and use "machine.deepsleep(60000)" so it wakes only after 60s ?
  • Pin Module Doubts (Solved)

    module pin callback method pin.init
    3
    0 Votes
    3 Posts
    396 Views
    nespressifN
    @dan said in Pin Module Doubts: Hi, to disable the callback, set the handler to None. It's mentioned on the docs page as well. Ok, sorry, I had not see it. Thank you for your rapid response.
  • LTE M1 with Swisscom SIM

    fipy lte lte-m apn swisscom
    1
    0 Votes
    1 Posts
    669 Views
    No one has replied
  • Micropython firmware for esp32

    micropython esp32 firmware
    6
    0 Votes
    6 Posts
    1k Views
    robert-hhR
    @priis You constantly use the wrong firmware images with the wrong tools. Stop panicking. If you have a WiPy3, then you have to use the Pycom tools. The pycom firmware will be downloaded by the pycom update tool on the fly. You do not have to download the firmware beforehand. The firmware updating tool is here: https://pycom.io/downloads/ The instructions are in the link I gave you earlier: https://docs.pycom.io/gettingstarted/installation/firmwaretool Please follow the instructions. You do not have to use esptool.py of firmware images from other sources.
  • What can run on the ULP co-processor?

    power saving sipy ulp
    3
    0 Votes
    3 Posts
    1k Views
    M
    Any news on the ability to utilize the ULP through micropython APIs?
  • 0 Votes
    1 Posts
    363 Views
    No one has replied
  • nb-iot on t-mobile NL

    nb-iot t-mobile
    2
    2 Votes
    2 Posts
    540 Views
    A
    @eric-waai We have successfully connected to our Huawei eNodeB based NB-IoT network in Norway with modem firmware revision 37781. For some reason the 38729 firmware revision is not working. Our NB-IoT network is deployed in guard band.
  • 0 Votes
    4 Posts
    690 Views
    robert-hhR
    @verkehrsrot Sorry, I do not know a documentation of the Pycom method. I also do not expect that the Pycom method will be implemented by esptool.py, since almost every other ESP32 board maker implements the DTR/RTS method.
  • 0 Votes
    1 Posts
    444 Views
    No one has replied

Pycom on Twitter