Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

posted at

WeAct STM32F11CEU6 Core Board で遊ぶ - Micropython編

情報少ないですし,自分の過去記事と重複する内容もありますが...

まずはファームを書き込み

Macでの見え方

image.png
image.png

Thonnyで操る

無題の画像.png

せっかくなので拙いサンプルを...

main.py
# https://github.com/WeActTC/MiniSTM32F4x1
# https://micropython-docs-ja.readthedocs.io/ja/latest/pyboard/quickref.html

# GPIO demo includes LED drive

from pyb import Pin
C13 = Pin('PC13',Pin.OUT_PP,Pin.PULL_NONE)
print(C13) # print C13 definition
C13.low()
print(C13.value())

# Alternate LED access

pyb.delay(1000)
pyb.LED(1).off()

for i in range(11):
    pyb.delay(100)
    pyb.LED(1).toggle()

# [KEY] Access for WeAct Board

from pyb import Switch
sw=Switch()
sw.callback(lambda:pyb.LED(1).toggle())

Switchはチャタリング処理もしているようです。

STM32 Bootloaderを起動する

import machine
machine.bootloader() 

参考URL

以上です!

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?