Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

EEE226 Engineering Software Design

Assignment 1(a) V1.7

Assessment 1 requires you to use the knowledge gained so far in the course to build a Simon game using the RGB LED and the touch slider. You will be assessed on your progress and quality of your program.

Background

Simon was an electronic game introduced in 1978 as 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 colour lights, the player has to         respond by pressing the colour lights in the same order. The sequence gets longer through each iteration, with the game ending when the user enters an incorrect sequence.

Figure 1 - Simon game, introduce in 1978 by Milton Bradley (Wikipedia)

As an example, a game could play as follows:

Simon: green, green, yellow

Player : green, green, yellow This is OK!

Simon: green, green, yellow, red

Player : green, green, yellow, red This is OK !

Simon: green, green, yellow, blue, red

Player : green, red, yellow, blue, red This is not OK, game over!

Assignment

The objective is to program the board as a Simon game. 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

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, GREED, & BLUE. This must be done using PWM control of the LED. See              information at end of this document on how to mix colours with the RGB LED.

-      The sequence should start with length of one and increase by one each time. The new colour should be added to the end of the sequence.

-      The sequence should be different every time the game is played.

-      The player should see a confirmation of the slider position they have pressed (i.e. RGB LED shows red briefly when 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.

-      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 either automatically or by touch of the slider.

Q&A

Q1 Can I use different colours for the slider positions?

A1 No, I have over 140 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! I may also think that you had incorrectly coded your slider.

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. You will get opportunity when you submit your work to tell me what they mean. Just make sure you stick to the three position colours I have stated above.

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 fiddle with the settings in processor expert but better still, write some code to deal with fact that this happens. 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.

Q5 I have tried to make a random sequence but it isnt 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.

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 for round 1, then in round 2 if you add green the new sequence will be red,blue,red,green

Q7 Can I make different levels of gameplay?

A7 Yes, you can make the game as sophisticated as you like. You must however make sure the basic specification above is clearly demonstrated.

Q8 How many rounds should be possible?

A8 – 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’ . 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 a 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 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 8 November – 2 hours in lab

Tuesday 15 November – 2 hours in lab

Tuesday 22 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 16 December 2022 @ 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.