STM32F3 159.233 Assignment 2

159.233 Assignment 2
Due 6th May 2019
This assignment is concerned with building a simple memory and co-ordination toy using the STM32F3 Discovery board
The board should do the following:
When powered on, the 8 LEDs should spin in a circle until the blue button is pressed.
When the button is pressed, a random sequence of LEDs will light up. Only LD3,LD7,LD10, and LD6 (PE9, PE11,PE13 and
PE15) can be in the sequence and each LED in the sequence must be different to the previous one. Each LED must be lit for
500ms. The sequence cannot be the same each time the program is run.
After the sequence has been played, the user has to tip the board to recreate it. Initially all the LEDS will be off. One of the 4
LEDs will light up when the board is tipped towards it (use a threshold of 200 in the x and y direction from the accelerometer
with a 2G full scale sensitivity). When the accelerometer detects that the board has been tipped towards an led for more than
500ms it will go off. If it is the correct LED for the sequence, the next LED in the sequence will be detected until they are all
correct. If an incorrect LED is detected, the correct LED will be lit for 500ms and the toy will return to the initial spinning
loop.
The initial sequence will show 3 LEDs, if the sequence is recreated correctly, a sequence of 4 LEDs will be shown, then 5, then
6 and finally 7. If the user recreates a 7 LED sequence, all the LEDs will flash repeatedly on and off for 200ms until the button
is pressed.
You must submit a single file which will compile using the online mbed compiler (https://os.mbed.com/). Use only the library
available here:

STM32F3作业代做、LEDs留学生作业代写、代做Python,Java编程作业
https://os.mbed.com/users/MartinJohnson/code/STM32F3-Discovery/
If you want a more challenging assignment and have a VGA cable and monitor, as an alternative to the above you can submit a
port of an arcade game of your choosing, e.g. Asteroids (https://en.wikipedia.org/wiki/Asteroids_(video_game)) or Breakout
(https://en.wikipedia.org/wiki/Breakout_(video_game)) Use the accelerometer and user button as controls. Use the space
invader demo here for the video/graphics:
https://os.mbed.com/users/MartinJohnson/code/Space_Invaders_Demo/
or the colour video demo here:
https://os.mbed.com/users/MartinJohnson/code/Colour_Video_Demo/
The connections to the VGA cable are described in comments at the start of video.c in both examples (the colour connections
are different).
Marks will be awarded for well written programs which correctly implement the toy or game. Use comments in your code to
document it. Marks will be subtracted for plagiarism, late submission and bad documentation.
M Johnson 2019

因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected]

微信:codinghelp

原文地址:https://www.cnblogs.com/comtopython/p/10821267.html

时间: 2024-08-29 16:08:52

STM32F3 159.233 Assignment 2的相关文章

ascii码所有字符对照表(包含汉字和外国文字)

http://www.0xaa55.com/thread-398-1-1.html看到了0xaa55的这个帖子,想起了2年前我在51cto发的一个帖子http://down.51cto.com/data/293635 [C] 纯文本查看 复制代码 01 #include <stdio.h>  02 void main( void ) 03 { 04     FILE *stream; 05     int i,j; 06     stream=fopen("ascii.txt&quo

七、进程管理

7.1.进程简介 Linux是一个多用户多任务的操作系统,可以同时执行几个任务,并在一个任务还没有执行完成就执行另一项任务.在Linux中,每个执行的任务都称为进程(process).通常进程与程序的区别为:   程序 (program):通常为binary program,放置在储存媒体中 (如硬盘.光盘.软盘.磁带等),为实体文件的型态存在.  进程 (process): 程序被触发后, 运行者的权限与属性. 程序的程序码与所需数据等都会被加载内存中,操作系统并给予这个内存内的单元一个识别码

STA303 - Assignment

STA303 - Assignment 1Winter 2020Due 2019-01-31This assignment is worth 5% of your final grade. It is also intended as preparation for Test 1 (worth 20%)and your final exam, so making a good effort here can help you get up to 33% of your final grade.

hdu 5015 233 Matrix (矩阵快速幂)

题意: 有一种矩阵,它的第一行是这样一些数:a  0,0 = 0, a 0,1 = 233,a 0,2 = 2333,a 0,3 = 23333... 除此之外,在这个矩阵里, 我们有 a i,j = a i-1,j +a i,j-1( i,j ≠ 0).现在给你 a 1,0,a 2,0,...,a n,0, 你能告诉我a n,m 是多少吗? n,m(n ≤ 10,m ≤ 10 9)输出 a n,m mod 10000007. 思路:首先我们观察n和m的取值范围,会发现n非常小而m却非常大,如果

Algorithm Part I:Programming Assignment(2)

问题描述: Programming Assignment 2: Randomized Queues and Deques Write a generic data type for a deque and a randomized queue. The goal of this assignment is to implement elementary data structures using arrays and linked lists, and to introduce you to g

RailsCast26 Hackers Love Mass Assignment rails中按params创建、更新model时存在的安全隐患

Mass assignment是rails中常用的将表单数据存储起来的一种方式.不幸的是,它的简洁性成了黑客攻击的目标.下面将解释为什么及如何解决. 上述表单为一个简单的注册表单.当用户填入name,点击提交时,一个新用户被创建.用户模型被如下定义: ruby create_table :users do |t| t.string :name t.boolean :admin, :default => false, :null => false end 当用户点击提交时,如下的action被执

233 Matrix 矩阵快速幂

In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matrix called 233 matrix. In the first line, it would be 233, 2333, 23333...

hdu 5015 233 Matrix (矩阵高速幂)

233 Matrix Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 749    Accepted Submission(s): 453 Problem Description In our daily life we often use 233 to express our feelings. Actually, we may s

hdu4781 Assignment For Princess(构造)

题目链接:hdu4781 Assignment For Princess 题意:n个点m条边,每条有向边的权值分别是1,2,3…m,一个点能到达任意一个点,没有重边和自环,没有任何两条边的权值相同,任意一个有向环的权值和必须是3的倍数,现在需要把这个图输出来. 题解:注意到题目给出的范围m >= n+3,所以一定是可以构造出一个1~n的回路使得权值和为3的倍数的,可以让前n-1条边权值为1~n-1,第n条边(n->1)可以为n, n+1, n+2从而满足题意,后面再连任意两条不相邻的边时,边权