DAC

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Hansg
Posts: 4
Joined: Fri Sep 11, 2015 12:58 pm

DAC

Post by Hansg » Wed Jan 27, 2016 3:29 pm

Hello all,
I do:
from pyb import DAC
dac=DAC(1, bits=12)
and I get type error: function does not take keyword arguments
What do I wrong?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: DAC

Post by dhylands » Wed Jan 27, 2016 3:38 pm

This seems to work fine on my pyboard. Are you using a pyboard? My guess would be that your firmware is too old and needs to be updated.

Code: Select all

MicroPython v1.5.2-81-gac11e89-dirty on 2016-01-26; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>> 
>>> from pyb import DAC
>>> dac = DAC(1, bits=12)
>>> 

Hansg
Posts: 4
Joined: Fri Sep 11, 2015 12:58 pm

Re: DAC

Post by Hansg » Thu Jan 28, 2016 4:07 pm

Thank you very much, updating from firmware did the trick.

Post Reply