Search found 3821 matches
- Mon Aug 03, 2015 1:38 am
- Forum: Other Boards
- Topic: Best way to write complex code STM32FDIC
- Replies: 1
- Views: 2751
Re: Best way to write complex code STM32FDIC
When debugging, I don't use main.py. Instead, I copy my files to the pyboard's filesystem (these days I use rshell: https://github.com/dhylands/upy-shell/tree/master/rshell) and then from the REPL, I do import myscript (where the file is called myscript.py). Then I get to see all of the error messag...
- Sun Aug 02, 2015 8:54 pm
- Forum: Other Boards
- Topic: STM32F4DISCOVERY Setting GPIOs and Modules
- Replies: 17
- Views: 20197
Re: STM32F4DISCOVERY Setting GPIOs and Modules
Hi Dave I tried your program and it works great. thanks I have an issues though with the ttyAMC0 port when I run screen or picocom still. I was wondering if you may have some other suggestions on how to fix it. I get the following error message : FATAL: cannot open /dev/attyAMC0: No such file or di...
- Sun Aug 02, 2015 4:37 pm
- Forum: General Discussion and Questions
- Topic: Port groups and interrupts
- Replies: 2
- Views: 2787
Re: Port groups and interrupts
The stm32f4 processors don't have a notion of "port changed". It only has a restricted sense of pin changed. You can watch for a particular pin changing, but you can only watch a single pin 0, and a single pin 1. So you can watch D0 and C2, but you can't watch D2 and C2. For your example, you can us...
- Sun Aug 02, 2015 12:49 am
- Forum: Other Boards
- Topic: STM32F4DISCOVERY Setting GPIOs and Modules
- Replies: 17
- Views: 20197
Re: STM32F4DISCOVERY Setting GPIOs and Modules
That sounds like there might be permissions problems then. The /dev/ttyACM0 is normally owned by root with a group of dialout. You can add yourself to the dialout group: sudo adduser your-username dialout and then logout and log back in (if you're running a desktop, then you need log out of the desk...
- Sat Aug 01, 2015 10:45 pm
- Forum: Development of MicroPython
- Topic: Makefile structure for stmhal
- Replies: 12
- Views: 10560
Re: Makefile structure for stmhal
Yesterday I had a look on the libopencm3 library http://libopencm3.org . This library has a much better and cleaner interface than STM's Hal - my opinion. It's LGPL3 licensed, but that shouldn't be a problem if you link the library. A simple CDC example compiles with less then 6kB of Code and I was...
- Sat Aug 01, 2015 9:22 pm
- Forum: Other Boards
- Topic: STM32F4DISCOVERY Setting GPIOs and Modules
- Replies: 17
- Views: 20197
Re: STM32F4DISCOVERY Setting GPIOs and Modules
I guess it depends on the software that you're using. You want it to close the serial port. If it leaves the serial port open, and the pyboard resets, or is plugged in and unplugged, and /dev/ttyACM0 is still open by some program, then the pyboard will now come up on /dev/ttyACM1 I wrote a program c...
- Sat Aug 01, 2015 6:25 am
- Forum: Other Boards
- Topic: STM32F4DISCOVERY Setting GPIOs and Modules
- Replies: 17
- Views: 20197
Re: STM32F4DISCOVERY Setting GPIOs and Modules
And you may also need to do:
Code: Select all
sudo apt-get install python3-pip
- Sat Aug 01, 2015 12:50 am
- Forum: General Discussion and Questions
- Topic: Why is this so hard?
- Replies: 26
- Views: 19449
Re: Why is this so hard?
Thanks, would be good to know where the tumer defines are that you used. I'm not sure which defines you're referring to. The stm constants come from the stm module. You can use dir(stm) to get a list of the constants, or use help(stm) to get a list of the constants along with their values. If you'r...
- Sat Aug 01, 2015 12:32 am
- Forum: General Discussion and Questions
- Topic: Make a pin a (high) input
- Replies: 3
- Views: 3703
Re: Make a pin a (high) input
To make the pin an input and be high by default, then you should do: pin = pyb.Pin('X1', pyb.Pin.IN, pull=pyb.Pin.PULL_UP) This enables the (weak) internal pullup resistor. So that if nothing is driving the pin, then it will be read as a high. It wasn't clear to my why you'd configure the pin to be ...
- Sat Aug 01, 2015 12:10 am
- Forum: Other Boards
- Topic: STM32F4DISCOVERY Setting GPIOs and Modules
- Replies: 17
- Views: 20197
Re: STM32F4DISCOVERY Setting GPIOs and Modules
Thanks Now, I read that to run the script you use pyboard.py but when I try to run it to load test.py to the STM324FDiscovery get the following: julio@julio-virtual-machine:~/micropython/tools$ python pyboard.py test.py File "pyboard.py", line 139 ret = self.exec('print({})'.format(expression)) ^ S...