OOPic (Object Oriented Pic) Dominick D’Aniello Jacques Bosman.

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
Advertisements

Electrical team Arduino tutorial I BY: JOSHUA arduini
Lab7: Introduction to Arduino
Mini-SumoBot Construction and Programming
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
ENGR 101: Robotics Lecture 2 – Text Programming Outline  Introduction to PBASIC  Variables, I/O, Arithmetic  Controlling the LEDs References 
1 Color Discriminating Tracking System Lloyd Rochester Sam Duncan Ben Schulz Fernando Valentiner.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
MECH 400 Adam Schuetze:
Mechanical Checkers Peter Frandina Raymond Poudrier Christopher Rouland.
Introduction.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Parallax 4x20 LCD (part number 27979) with Arduino Duemilanove
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Digital Outputs LCD Display
EE 1106: Introduction to EE Freshman Practicum
OOPic Programming Fundamentals Compiled vs. Interpreted programs –Compiled program converts high level code into native machine language e.g., y=x+5; Machine.
A Simple Tour of the MSP430. Light LEDs in C LEDs can be connected in two standard ways. Active high circuit, the LED illuminates if the pin is driven.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
First Steps with Eagle PCB by Keith Barrett - Pakuranga College, Auckland, New Zealand v.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Arduino 101 Instructors: Ted Markson / Jim Sweeney.
Software and documentation Download and install: “Setup-Stamp-Editor-Lrg-v2.2.6.exe”  Downloads  BASIC Stamp software BASIC Stamp Syntax.
Programming Fundamentals. Today’s Lecture Why do we need Object Oriented Language C++ and C Basics of a typical C++ Environment Basic Program Construction.
Designing An Electronic Trigger For A Paintball Marker To Allow User Selectable Firing Rates Team WTR.
Digital Electronics Board-of-Education : Input. Board of Education - Input This presentation will explain, both from a hardware and software perspective,
Applications Development
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
I NTRODUCTION TO PIC PROGRAMMING By : S HERIF H ARHASH.
Embedded Programming and Robotics Lesson 11 Arduino Interrupts 1.
Introduction to LabVIEW
Embedded systems and sensors 1 Part 2 Interaction technology Lennart Herlaar.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Introduction to LabVIEW. Overview Objectives Background Materials Procedure Report/Presentation Closing.
Embedded C- Language Lets Learn fundamentals !!. An Embedded system is combination of computer hardware and software, and perhaps additional mechanical.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Wireless control of an LED. the XBee transceiver transmitter: sends radio waves receiver: receives radio waves transceiver: sends AND receives.
EG1003: Introduction to Engineering and Design Introduction to LabVIEW.
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Lets Learn fundamentals !!
Introduction of Embedded C and demo programs
Introduction to LabVIEW
Scrolling LCD using Arduino.
Key Ideas from day 1 slides
Microcontroller Applications
LCD.
Introduction to Arduino Microcontrollers
Programming Boe-Bots (Part 1)
What is Arduino? By James Tedder.
Mobile Development Workshop
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Introduction to LabVIEW
CSCI1600: Embedded and Real Time Software
Introduction to LabVIEW
CSCI1600: Embedded and Real Time Software
Keypad Source: under under
Keypad Source: under under
Introduction to LabVIEW
Introduction to LabVIEW
Introduction to LabVIEW
Interrupts.
LCD.
Presentation transcript:

OOPic (Object Oriented Pic) Dominick D’Aniello Jacques Bosman

Overview What is the OOPic? What Makes the OOPic Different? – Hardware Objects – Virtual circuits – Events The OOPic IDE The OOPic Language Demo

What is the OOPic? OOPic is an object oriented operating system (and hardware circuit) Programmed in a Basic like or Java/C++ style language Capable of inter-OOPic communications

What makes the OOPic different? Physically, the OOPic is nothing more than a Microchip™ Pic microcontroller slapped on a circuit board with some EEPROM and a few pin headers for easy access to the Pic’s pins. What makes the OOPic unique is the software it runs. The OOPic software allows one to interact with physical hardware, as if it were a OOP software object. +=

Hardware Objects OOPic offers many pre-made “Hardware objects” that provide software mappings to real world hardware. Objects include something as simple as 1 bit digital IO (An LED or a switch) to something as non trivial as an LCD or a stepper motor. Allows for intuitive statements such as: LCD.Operate = 1 ' Turn on the oLCD Object. LCD.Init ' Initialize the LCD Module. LCD.Clear ' Clear the screen. LCD.Locate(0,1) ' Locate cursor at row1, col2. LCD.String = "Hello World" ' Print "Hello World" on LCD.

Virtual Circuits OOPic allows you to create multiple “Virtual circuits” that run independently of each other and your running code. Dim Button1 As New oDIO1 Dim Button2 As New oDIO1 Dim RedLed As New oDIO1 Dim AndGate As New oGate(2) Button1.IOLine = 1: Button1.Direction = cvInput Button2.IOLine = 2: Button2.Direction = cvInput RedLed.IOLine = 3: RedLed.Direction = cvOutput AndGate.Input1.Link(Button1.Value) AndGate.Input2.Link(Button2.Value) AndGate.Output.Link(RedLed.Value)

Events The OOPic supports events (interrupts) through the oEvent object Event is triggered when the oEvent objects operate value goes from 0 to 1. When the even is triggered the procedure with the same name as the event, followed by “_code” is executed, for example if you have an oEvent object named “bump”, then the procedure named “bump_code” would execute when bump.operate = 1. Events can have different priorities (lower priorities have precedence) Events interrupt current program flow, when they return, program flow resumes where it left off.

The OOPic IDE The OOpic IDE offers simple editing, flashing, and debugging features. Code is shown on the left, objects represented in the code are shown on the right. When the OOPic is connected to the computer you can click on any of the objects in the right hand panel to view and manipulate their current state.

The OOPic IDE (Cont)

The OOPic Languages The OOPic offers 3 basic language modes (Basic and Java/C++ style). The BASIC style is fairly true to traditional BASIC syntax, however the Java/C++ style is only very loosely related to actual Java and C++ syntax (Basically it has ;’s) Java and C++ languages types are technically treated differently, but VERY few differences exist.

The OOPic Languages (cont) Supports all basic loop and control structures (If/then/else, switch, for, do/while) Procedures support recursion (limited only by stack space) Supports arrays of any object type (Arrays are indexed starting at 1, not 0) Supports user defined objects

The OOPic Languages (cont) Dim A As New oDio1 Sub Main() A.IOLine = 31 A.Direction = cvOutput Call Blink End Sub Sub Blink() A.Value = cvON OOPic.Wait = 100 A.Value = cvOff OOPic.Wait = 100 End Sub BASIC Java/C++ oDio1 A = New oDio1; Sub void main(void) { A.IOLine = 31; A.Direction = cvOutput; Blink(); } Sub void Blink(void) { A.Value = cvON; OOPic.Wait = 100; A.Value = cvOff; OOPic.Wait = 100; }

Demo 1. oDio1 LED[8] = New oDio1; 2. oWire wires[4] = New oWire; 3. Sub void Main(void) 4. { 5. OOPic.Node = 2; 6. oByte I = New oByte; for (I.Value = 1; I.Value <= 8; I.Value++) 9. { 10. LED[I.Value].IOLine = (I.Value + 7); 11. LED[I.Value].Direction = cvOutput; 12. LED[I.Value].set; 13. } 14. wires[1].Input.Link(OOPic.Hz1); 15. wires[1].Output.Link(LED[5]); 16. wires[1].InvertIn = cvFalse; 17. wires[1].Operate = cvTrue; 18. wires[2].Input.Link(OOPic.Hz1); 19. wires[2].Output.Link(LED[6]); 20. wires[2].InvertIn = cvTrue;

Demo 21. wires[2].Operate = cvTrue; 22. wires[3].Input.Link(OOPic.Hz1); 23. wires[3].Output.Link(LED[7]); 24. wires[3].InvertIn = cvFalse; 25. wires[3].Operate = cvTrue; 26. wires[4].Input.Link(OOPic.Hz1); 27. wires[4].Output.Link(LED[8]); 28. wires[4].InvertIn = cvTrue; 29. wires[4].Operate = cvTrue; 30. Do 31. { 32. for (I.Value = 1; I.Value <= 4; I.Value++) 33. { 34. LED[I.Value].value = 0; 35. OOPic.delay = 20; 36. LED[I.Value].value = 1; 37. OOPic.delay = 20; 38. } 39. } while (1); 40. }