首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代做EEE226、java,c++编程代写
项目预算:
开发周期:
发布时间:
要求地区:
EEE226 – Engineering Software Design GA Assessment (2023) – V1.4
Assessment 1 requires you to use the knowledge gained so far in the course to build a memory game using the RGB LED and the touch slider. You will be assessed on the progress and quality of your program.
Background
Simon was an electronic game introduced in 1978 (shown in the picture below); it was one of the top-selling Christmas toys in the US that year. The device creates a sequence using the coloured lights, the player has to respond by pressing the coloured lights in the same order. The sequence gets longer through each iteration, with the game ending when the user enters an incorrect sequence. You are going to make a variation of this game where the device creates a sequence of five lights and then repeats the sequence with one missing (replaced by a white light); the player has to select which coloured light is missing. If correct, for the next round the device adds another coloured light to the same sequence and the whole sequence is shown to the user. The device now repeats the sequence with two lights missing; the user has to input the two coloured lights that were missing in the correct order. The game continues with each round the sequence getting longer and the number of lights missing each increasing. The game is over when the user enters the wrong sequence of missing lights.
Figure 1 - Simon game, introduced in 1978 by Milton Bradley (Wikipedia) As an example, a game could go as follows:
Round 1
Simon: green, green, blue, green, red
Simon: green, green, white, green, red
Player: blue – This is OK! In the above sequence, the 3rd (blue) colour was selected as the missing colour and replaced by white for the second sequence.
Round 2
Simon: green, green, blue, green, red, red
Simon: green, white, white, green, red, red
Player: green, blue – This is OK! The 2nd (green) and 3rd (blue) colours were replaced by white
Round 3
Prof. D. Gladwin 30/10/2023 EEE226 – GA Assessment (2023) - V1.4 ©The University of Sheffield
Simon: green, green, blue, green, red, red, blue
Simon: green, green, white, white, white, red, blue
Player: red, blue, green – This is not OK, game over! The user entered the incorrect sequence of missing colours. It should have been green, blue, green.
Assignment
The objective is to program the board to play the game as described above. You should present a random sequence to the user using the RGB LED made up of three colours, RED, GREEN and BLUE. The colours will represent three positions on the touch slider.
Left = RED
Middle = GREEN
Right = BLUE
(this is holding the board so that the touchpad is at the bottom)
The following specification should be met:
- There should be an indication using the RGB LED that the game is about to start. You must use more colours than just RED, GREEN, & BLUE. This must be done using PWM control of the LED to blend colours together. See information at end of this document on how to mix colours with the RGB LED. Make it clear that the sequence is about to be repeated.
- The sequence should start with a length of 5 and increase by one each time, add the new colour to the end of the sequence.
- The sequence should be different every time a new game is played, if I restart the board I shouldn’t get the same sequence. This includes the colours that are missing in the repeated sequence.
- The player should see a confirmation of the slider position they have pressed (i.e. RGB LED shows red briefly when the left-side of slider is pressed).
- The game should be coded so that double touches/movement on the slider are not counted as additional inputs to the response sequence. There is a document on blackboard to help you with this.
- The game is over when the player enters the wrong sequence and this is indicated by the RGB LED doing something interesting.
- The game should restart after a short pause and a touch of the slider.
Q&A
Q1 – Can I use different colours for the slider positions?
A1 – No, I have over 160 of these to mark, if you want the marks back in a reasonable time then I need them all to be the same to test!
Q2 – Can I use different colours to show game progress, for example yellow for about to start?
A2 – Yes, you must use different colours and I have provided information at the end of this document to help you. Just make sure you stick to the three position colours I have stated above. You will get the opportunity when you submit your work to tell me what they mean, however, the marking rubric shows marks for the game interface which should be intuitive.
Q3 – This is crazy, the touchpad is not accurate enough?
A3 – Yes it is. Don’t just divide the slider into three equal areas, create a larger area for the middle as you know that you can touch the extreme edges for the other positions.
Q4 – The touchpad is registering two or more touches when I only press once?
A4 – You can alter the settings in processor expert but better still, write some code to deal with fact that this happens – I have provided a document in BB to help. I will be looking at the reliability of your code in detecting this. You can also put insulation tape over the touchpad, this has had good results. Try to avoid touching the freedom board circuity with the other hand, I use Blu Tack to stick the board to my desk.
Q5 – I have tried to make a random sequence but it isn’t random does it matter?
A5 – Yes it matters, think about how you can set the seed of your random number generator differently each time the game is started.
Prof. D. Gladwin 30/10/2023 EEE226 – GA Assessment (2023) - V1.4 ©The University of Sheffield
Q6 – Does it matter if I add the next colour at the end of the sequence or the beginning?
A6 – You need to add the new colour at the end of the sequence. If you start with red,blue,red,green,blue for round 1, then in round 2 if you add green the new sequence will be red,blue,red,green,blue,green.
Q7 – Can the missing colours start at the 1st colour position.
A7 – Yes, the start of the missing colours should be selected at random from anywhere in your sequence of colours. For example if you had red,blue,red,green,blue,green for round 2 then you could display white,white,red,green,blue,green. The missing colours do need to be consecutive.
Q8 – Can I make different levels of gameplay?
A8 – Yes, you can make the game as sophisticated as you like. You must however make sure the basic specification above is clearly demonstrated.
Q9 – How many rounds should be possible?
A9 – I think I have the skills.... 50 rounds please.
Uploading your assessment
When you have completed the assignment you should navigate using windows explorer (or mac equivalent) to your workspace directory. From there zip the contents of your project folder as shown below and call it ‘username_assigment1’, for example, ‘ela09jh_assignment1’. Do not try to change the name of your project within KDS as it will break, you only need to change the name of the zip file that you uplaod. Check by opening the zip file that it contains all your files and folders, it should be approx. 3-5MB in size. In blackboard you will find an ‘Assignment 1’ folder which a final submission test. Start the test and you will be asked to upload your zip file and fill in some text boxes. When this is done remember to ‘Submit’ your test.
HINT: Note that zipping your project folder is also a method of backing up your work as you progress and a good idea to get into the habit of doing it for future projects. If you are unsure about how to create a zip file have a look on Google. A free recommended archiving utility available for windows is ‘7zip’.
Time allocation
Tuesday 31 October – you may have the other labs to complete but do read through this document carefully. Tuesday 7 November – 2 hours in lab
Tuesday 14 November – 2 hours in lab
Tuesday 21 November – 2 hours in lab
Expect to spend between 6 and 12 hours to complete the assessment in your own time depending on your previous experience.
DEADLINE FOR SUBMISSION – Friday 15th December 2023 @ 23:30
The assignment 1 submission tests will automatically close at 23:30 and you will not be able to submit any more work. Late submission will not be accepted and you will receive marks only for work that has been uploaded before the deadline. You will receive your marks before the Easter break in semester 2 as each one has to be downloaded, compiled and tested which takes a long time. There will be feedback posted to your mark in blackboard which you will be able to view by clicking on ‘My Grades’ and then clicking on the ‘Assessment 1’ score.
Prof. D. Gladwin 30/10/2023 EEE226 – GA Assessment (2023) - V1.4 ©The University of Sheffield
Mixing colours
All colours can be represented by the RGB colour model. You can see an example of this if you look at the colour palette in most software programs such as the font colour selector in Microsoft Word. If you create a custom colour by moving the mouse around the colour chart you will see the values of red, green and blue changing. These values represent the intensity of each colour from 0 meaning off to 255 fully on. As the Freedom board has a RGB LED you should be able to create any colour with it similarly using the RGB model. You will need to vary the intensity of each LED independently, a method to do this is to use pulse-width modulation (PWM) as shown below.
Figure 2 – PWM controlled LED
STUDY: If you are unfamiliar with PWM do some research on the topic
PWM control of LED
In a microcontroller a hardware PWM signal is generated using a comparator feature of the timers. A basic block diagram is shown below in Figure 2. The primary clock signal is scaled through a prescaler to slow it down and is generally a power of 2. In Processor Expert this value is configured automatically when you set the period time length of the timer unit used for PWM generation. The timer counts up until it reaches its maximum value and then starts again from zero producing a sawtooth waveform as shown in Figure 3. In your program you will specify the duty cycle required, this value is stored as a registry value. This registry value and the current value of the timer are compared and when the timer reaches the value in the registry the output of the PWM is set high. When the timer is reset to 0 the comparator result will also reset causing the PWM output to go low. The PWM output generated from two different duty cycle levels are shown in figures 3 and 4. Each timer unit on the KL25Z support 2 channels of comparator to be used with two PWM signals.
Figure 3 – Hardware PWM generation in Microcontrollers
Figure 4 – PWM generation 60%
Prof. D. Gladwin 30/10/2023 EEE226 – GA Assessment (2023) - V1.4 ©The University of Sheffield
Figure 5 - PWM generation 20%
Output pin configurations - KL25Z (BROWN):
PTB18 – Period Device: TPM2_MOD, Duty Device: TPM2_C0V PTB19 - Period Device: TPM2_MOD, Duty Device: TPM2_C1V PTD1 – Period Device: TPM0_MOD, Duty Device: TPM0_C1V
Output pin configurations – KL05Z (GREEN):
PTB8 – Period Device: TPM0_MOD, Duty Device: TPM0_C3V PTB9 - Period Device: TPM0_MOD, Duty Device: TPM0_C2V PTB10 – Period Device: TPM0_MOD, Duty Device: TPM0_C1V
Prof. D. Gladwin 30/10/2023 EEE226 – GA Assessment (2023) - V1.4 ©The University of Sheffield
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!