Search found 344 matches

by devnull
Wed Mar 27, 2019 12:40 pm
Forum: MicroPython pyboard
Topic: wiznet - OSError: no available NIC
Replies: 5
Views: 323

Re: wiznet - OSError: no available NIC

Hmmm... I tried this example: http://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html#simple-http-server But that also fails with: listening on ('0.0.0.0', 80) client connected from ('192.168.0.15', 80) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "wizt...
by devnull
Wed Mar 27, 2019 12:29 pm
Forum: Pyboard D-series
Topic: Questions and wish list about Pyboard D
Replies: 35
Views: 2839

Re: Questions and wish list about Pyboard D

Does the pyboard D use the same build as pyboard 1.1 ??

and...

Can someone who has one let me know the result of this:

Code: Select all

import socket
dir(socket)
dir(socket.socket)
by devnull
Wed Mar 27, 2019 10:32 am
Forum: MicroPython pyboard
Topic: wiznet - OSError: no available NIC
Replies: 5
Views: 323

Re: wiznet - OSError: no available NIC

Damien, thanks for helping; Yes, that works, but it appears that I need to declare the nic module in the scope that the socket will be created, which would mean that all of the modules that I already have would need to be re-written to declare the nic card inside the module. Also, see this thread: h...
by devnull
Wed Mar 27, 2019 10:09 am
Forum: MicroPython pyboard
Topic: socket - no readline or makefile
Replies: 0
Views: 92

socket - no readline or makefile

I am testing the socket on the pyboard, but it seems to be missing many of the functions and constants that are avaiable on the ESP8266. These are not available readline makefile write IPPROTO_TCP SOL_SOCKET SO_REUSEADDR This makes it difficult to create any kind of socket server that needs to read ...
by devnull
Tue Mar 26, 2019 12:59 pm
Forum: MicroPython pyboard
Topic: wiznet - OSError: no available NIC
Replies: 5
Views: 323

wiznet - OSError: no available NIC

I am using a pyboard and wiznet in place of an esp8266 running mqtt, the wiznet is working fine and has an ip address. But umqtt_simple complains that it cannot find a NIC, umqtt_simple.py", line 16, in __init__ OSError: no available NIC I declared the nic in the boot.py file. import network nic = n...
by devnull
Sun Mar 24, 2019 7:12 am
Forum: General Discussion and Questions
Topic: merge variables from one module into another
Replies: 5
Views: 235

Re: merge variables from one module into another

Oops, answering my own question, but maybe someone else will find this useful:

Code: Select all

def init(pfile='pins'):
  pins = __import__(pfile)
  for var in dir(pins):
    if not var.startswith("__"):
      globals()[var] = getattr(pins,var)
But is the 'best' way ??
by devnull
Sun Mar 24, 2019 6:48 am
Forum: General Discussion and Questions
Topic: merge variables from one module into another
Replies: 5
Views: 235

Re: merge variables from one module into another

Just tried this as an alternative method but it does not work:

Code: Select all

def init(pins):
  from pins import *
  globals().update(locals())
 
by devnull
Sun Mar 24, 2019 6:33 am
Forum: General Discussion and Questions
Topic: merge variables from one module into another
Replies: 5
Views: 235

merge variables from one module into another

I want to use the same python code with different devices and want to do this by using a gpio.py file that will contain all of the gpio definitions as well as some common functions. the gpio.py will be called in several files, and the boot.py file will be the only file that gets changed to define wh...
by devnull
Sat Mar 23, 2019 9:40 am
Forum: General Discussion and Questions
Topic: ValueError: incompatible .mpy file
Replies: 2
Views: 200

Re: ValueError: incompatible .mpy file

Hi Robert;

Was just about to update when I saw your post, thanks for helping.

The problem was with a sub-module that was loaded inside the module I was calling, and not the file itself
by devnull
Sat Mar 23, 2019 9:16 am
Forum: General Discussion and Questions
Topic: ValueError: incompatible .mpy file
Replies: 2
Views: 200

ValueError: incompatible .mpy file

Have just updated from 1.9.4 to 1.10. Build of 1.10 was successful and loaded and running. Also went into mpy-cross folder and did make clean make And the new file was generated, but when I build a file using this new mpy-cross I get the error: ValueError: incompatible .mpy file Now I know that the ...