Flii Programming Workshop Marissa Milne Science Communication Officer.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Getting started with MPLAB Launch MPLAB Set Toolbar as in the next slide by clicking the leftmost icon Open a new Source file by choosing [FILE][NEW] Type.
SCRATCH Lesson Two – Interactive Concepts Using Sensing, Operators, and Variables.
Create a Simple Game in Scratch
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Lab7: Introduction to Arduino
Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on
X-Media V2.0 Healthcare Training Jayex Technology Limited X-Media V2.0 March 2010 v
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Garfield Graphics included with kind permission from PAWS Inc. All Rights Reserved. Making a PowerPoint Presentation 01 ‘Simple text and pictures’
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Introducing ActionScript 3.0 Object-oriented programming language Used to power Flash Player Similar to JavaScript Can be embedded in a Flash project.
© Anselm Spoerri Lecture 11 Flash –Build Flash Website with Animated Navigation Structure –Decide on Overall Navigation Layout, Import Images & Organize.
An Intro to Robots and Computer Programming
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Extending the Pong Example Barb Ericson Georgia Tech June 2011.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Animated Charting Using the Alice Bar Chart Template World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University December 2010.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
Dreamweaver CS6 Jumpstart CCSA 115 Web tools Lesson 1.
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
Game Design Creating a game called PING Phase 3: Steps for building basic game.
Using Technology in Training November 24, 2006 Overview Today’s session will focus on using PowerPoint to develop training materials.
Getting Started with Expression Web 3
GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School
CSS Sprites. What are sprites? In the early days of video games, memory for graphics was very low. So to make things load quickly and make graphics look.
Coding for the FIRST Tech Challenge: RobotC
Microsoft Office 2003 Illustrated Brief Document Creating a.
Booting. Booting is the process of powering it on and starting the operating system. power on your machine, and in a few minutes your computer will be.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
Programming and Problem Solving ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
Setting Up an on-line Store Tutorial Using SmartStore.biz This Tutorial assumes you have downloaded the software from This Tutorial.
Agenda Starter Estimate game Memory game Video about top 10 Activity Introduce the objectives Activity (create a talking book)
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
Programming Video Games
Project 2 Working on the Windows XP Desktop Windows XP Service Pack 2 Edition Comprehensive Concepts and Techniques.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Geometry. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions are.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Scratch pong challenge Pong is a classic 1970s video game  Open the pongv1.sb2 file in Scratch  Click the.
Creating Your First Web Page – Topic: Creating a wiki, blog, image blog and podcast Click Arrow - Next Slide 1.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
JDS5 Training Guide. On Start Up you will see this screen click the OK button Click OK.
The desktop (overview) Working with desktop icons The desktop is the main screen area that you see after you turn on your computer and log on to Windows.
11 EENG 1920 Introduction to VHDL. 22 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
LO: We’re learning to outline a program using Pseudo Code.
ICT/COMPUTING RULES Only use software allowed by the teacher
Alice and Java Unit 7 1. Day 1  Objective: Gain an introduction to Java and Eclipse  Essential skill: DM-1: Use technology to advance critical thinking.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Creating your own Handheld Games Console
Windows Vista Configuration MCTS : Interface and Device Options.
Introduction to Programming in RobotC
FOP: Multi-Screen Apps
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Microcontroller Applications
Using Mail Merge for Lotus Notes
Using a set-up file to read ASCII data into SPSS
File Handling Programming Guides.
European Computer Driving Licence
Creating a Simple Game in Scratch
Presentation transcript:

Flii Programming Workshop Marissa Milne Science Communication Officer

Overview *.X Project MPLAB X ICD 3 Docking Station PIC Microcontroller LEDs LCD Screen Switches

The Wiki Download Flii Source V2.0 Open the ZIP file drag the folder inside it onto the Desktop Open Flii Library V2.0 Function Descriptions

MPLAB X Open MPLABX IDE Go to File  Open Project Find Flii Hex and open it Under Project, expand the Source Files and open Functions.c

Things To Remember Case sensitivity –MyVariable is not the same as myvariable Underlined things = syntax errors –Using the wrong variable name –Using the wrong function Check if you’re using BufferWriteString(…) or BufferWriteMessage(…) –Missing brackets, semi-colons, etc

Programming the Flash Screen Find the WriteFlashScreen() function and work out what is happening! What is WriteBufferToScreen() doing? –A buffer temporarily holds data before it is processed. –Here, we put the information for the graphic into a buffer in the memory of the PIC chip first, then the buffer is written to screen.

Task: Show a welcome message between the flash screen and the menu display Programming the Flash Screen

Task: Add a graphic to our welcome screen Step 1: Design your graphic! –Use your grid to design a simple image –Make sure it won’t overlap your text Step 2: Turn your graphic into code –Use BufferWritePixel(x,y,PIXEL_ON); –Only write code for the pixels you want to turn on –Hint #1: Copy, paste & adjust! –Hint #2: Group the code for each line by leaving a blank line in between Challenge: Can you create a short animation?

Difficulty Levels in Pong Open Pong.c and inspect it – what’s happening? –Starts with EASY difficulty and a score of 0 –PongInit() is called first, sets the game up –UpdatePongGameState() is called every 20ms This is where the action happens! Update line 27 so your game starts at EASY difficulty: unsigned char PONG_DIFFICULTY = EASY_DIFFICULTY; Find line 249. Add an instruction so your game reverts to easy difficulty when it resets.

Task: Modify the program so that it increases in difficulty when a certain score is reached At the top of UpdatePongGameState() use an if statement to check the score. Increase difficulty level if needed. if(SCORE >= ??? && PONG_DIFFICULTY != NORMAL_DIFFICULTY){ // set difficulty level PONG_DIFFICULTY = NORMAL_DIFFICULTY; // initialise new level PongInit() } Difficulty Levels in Pong

Task: Modify the program so that the LED lights flash when a new difficulty level is reached Step 1: If you add LED function calls to Pong.c you will see an error about particular variables being undefined. To fix this: Add an extra #include line at the top of Pong.c: #include "Board_defs.h" Difficulty Levels in Pong

Task: Modify the program so that the LED lights flash when a new difficulty level is reached Modify your existing if statement to include LED instructions: if(SCORE >= 5 && PONG_DIFFICULTY != NORMAL_DIFFICULTY){ // set difficulty level PONG_DIFFICULTY = NORMAL_DIFFICULTY; //level up! LED1On(); LED2On(); DelayMs(500); LED1Off(); LED2Off(); //initialise new level PongInit(); } Difficulty Levels in Pong

Challenge: Modify your game so it progresses from EASY  NORMAL  HARD modes Challenge: Modify your level up behaviour so it shows a message and/or graphic on screen Challenge: What can change to make pong more difficult? –Ball speed (modify ball_Xvel and ball_Yvel) –Paddle speed (modify SENSITIVITY_EASY, etc in Pong.h) –Paddle size (modify right_paddle_sections) –Ball size (modify BufferWriteBall(char x, char y)) Hint #1: Change ONE thing at a time then TEST it! Hint #2: Use if statements to match changes with levels Difficulty Levels in Pong