• UART Reading

    4
    2
    0 Votes
    4 Posts
    138 Views
    R
    The error is self-explanatory. You are trying to subscript an object which you think is a list or dict, but actually is None. This means that you tried to do: None[something] This error means that you attempted to index an object that doesn't have that functionality. You might have noticed that the method sort() that only modify the list have no return value printed – they return the default None. 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't define the getitem method . This is a design principle for all mutable data structures in Python.
  • Ghost watchdog

    watchdog pybytes micropython
    9
    0 Votes
    9 Posts
    113 Views
    T
    sadly it's the same... rst:0x7 (TG0WDT_SYS_RESET),boot:0x37 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8020,len:8 load:0x3fff8028,len:2140 ho 0 tail 12 room 4 load:0x4009fa00,len:19760 entry 0x400a05bc
  • I2C Clock Stretching

    Moved
    19
    1 Votes
    19 Posts
    5k Views
    tiborrrT
    @Strevens great you got it to work. If you have time, could you please take a look at my topic at the following: https://forum.pycom.io/topic/6141/scd30-oserror-i2c-bus-error
  • Define WLAN/Bluetooth frequency

    1
    0 Votes
    1 Posts
    40 Views
    No one has replied
  • How to measure time in miliseconds?

    3
    0 Votes
    3 Posts
    83 Views
    J
    You could use the rtc.now(), that one contains microsecounds.
  • Pycom board emulator

    2
    0 Votes
    2 Posts
    178 Views
    N
    I am guessing not...these forums don't really seem to active. I was looking for something similar, which would definitely come in handy when emulating LTE connections. Waiting for a 10+ min attach to find an error in code really slows things down.
  • Interactive console with operational code

    3
    0 Votes
    3 Posts
    44 Views
    robert-hhR
    @netskink said in Interactive console with operational code: I've worked with esp32 in C and there is a capability where you can add a console component to your esp32 C app. Given that C is a compiled language, this is hard to understand for me. So I assume it's some kind of firmware/application package which is running in the device. Still, the ESP32 does not have a general purpose Operating System. If you want to have the Python console while an application code is running, you can start that application in a new thread and terminate the thread which started it. Then you will get the REPL prompt again. But this is not general multitasking, just a method to run several tasks at the same time.
  • UART

    5
    0 Votes
    5 Posts
    124 Views
    L
    Solved : turns out I needed a USB<->TTL and not an USB<->RS232... I did not know about the TTL standard, as I did not study eletronics at all. Gotta learn the hard way !
  • Digital Signatures / ECC

    4
    0 Votes
    4 Posts
    253 Views
    P
    Digital Signatures / ECC No, I have to communicate with a secure device that requires ECC to establish a shared AES key. I am trying to covert the library: https://github.com/starkbank/ecdsa-python Having to convert recursive functions. Wondering if there is an easier (faster) way.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Wrong dates on files saved to SD card

    4
    1
    0 Votes
    4 Posts
    71 Views
    robert-hhR
    @railmonitor said in Wrong dates on files saved to SD card: I seems that the filesystem is using an "epoch" date of 1st of january 2000. But how can i happen that it's giving me dates from newyearseve 1999? MicroPython does not care for timezones. It always assumes UTC. Since you PC does know timezones, there can be differences of a few hours. And unless you set the time of your FiPy properly, the time stamp value will start January 1st, 2000 on every boot. The Linux epoch time is January 1st, 1970. That may cause the 30 years difference. So it looks like the compensation for the epoch times difference is applied twice. May I ask you to raise an issue. That ensures that this glitch does not get lost and will eventually be fixed.
  • Changing runtime parameter on timer class

    lopy4 micropython
    1
    0 Votes
    1 Posts
    61 Views
    No one has replied
  • Verify Signature

    2
    0 Votes
    2 Posts
    145 Views
    WenboW
    Do you know how now?😂 I have the same question as you.
  • Translate Arduino code to microPython

    arduino micropython issues
    4
    0 Votes
    4 Posts
    79 Views
    J
    @Gijs Hello! that pin are not needed, infact my code is working, one hardware pin "p2" had some issue, it is constant 3.3V which means that the ploadPin are not toggled. The code awill hopefully be uploaded on Git!
  • ucollections & utime

    3
    0 Votes
    3 Posts
    58 Views
    T
    @crumble many thanks, I knew it would be a simple answer. I was fooled by IDE and now feel a bit foolish. I appreciate your quick reply it helped a lot. Definitely need to work more with micropython.
  • structuring modules for freezing into firmware

    2
    0 Votes
    2 Posts
    79 Views
    A
    Dear @gazmcghee, "The Frozen code implementation might not support sub-directories in MicroPython code." So does it support sub-directories or not? I was worried about that as well but I can well confirm everything works as intended. Our Terkin Datalogger contains modules with submodules [1] and freezing them works without any issue. Saying this, we would like to mention we are working with 1.20.x. With kind regards, Andreas. [1] https://github.com/hiveeyes/terkin-datalogger/tree/master/src/lib/terkin
  • How to read a specific number of lines from file?

    5
    0 Votes
    5 Posts
    124 Views
    R
    @robert-hh Great thanks! Hadn't found those methods myself, only been coding in Python for a few months! For anyone else looking for a similar solution, this should do the trick: sd = SD() os.mount(sd, '/sd') f = open('filepath') lines = [] stepsize = 5 offset = 0 def read_lines(): global offset global lines f.seek(offset) for x in range(stepsize): lines.append(f.readline().strip()) print(lines) offset = f.tell() print(offset) lines = [] Then you can close (and delete if you want) the file when done calling the method.
  • Need Help with LMP91000 IC Programming

    1
    0 Votes
    1 Posts
    28 Views
    No one has replied
  • A NEW TOPICCCCCCCC "maximum recursion depth exceeded"

    7
    1 Votes
    7 Posts
    130 Views
    B
    @robert-hh I have recompiled the interpreter with #define MICROPY_TASK_STACK_SIZE (16 * 1024) in mptask.h and that's fixed the problem, by increasing stack_len in the line stack_len = (MICROPY_TASK_STACK_SIZE_PSRAM / sizeof(StackType_t)); in mptask.c Strangely, I still had to set the stack size in micropython with _thread.stack_size(16 * 1024). Also unexpected was that my recursion check routine still returned the same values, so perhaps there actually is an interpreter recursion limit, distinct from the interpreter call stack limit. Ultimately tho, the change prevented the exception being thrown in my code, so yay.
  • Using FiPy Nano-Gateway as node to send data to The Things Network

    1
    0 Votes
    1 Posts
    38 Views
    No one has replied

Pycom on Twitter