Giter VIP home page Giter VIP logo

psocgame's Introduction


Dot Dodge Game with Cypress Psoc Creator 4.4

This is a simple game that uses a b10k potentiometer as a control input to move the player (a dot character) around on an SSD1306 Oled display. The result of the game is shown on a LED 7-Segment display.

Hardware Required

  • CY8CKIT-049-42xx PSoC 4 Prototyping Kit
  • b10k Potentiometer
  • SBc-Oled01 Display JoyIt (128x64 pixel SSD1306 monochrome OLED display)
  • LED 7-Segment Display 3461AS

Software Required

  • Cypress PSoC Creator 4.4
  • u8g2 library for monochrome displays

Getting Started

  1. Download the PSoC Creator Software from the Cypress website

  2. Install the u8g2 library, following instructions from here

  3. Open this project in PSoC Creator

How it Works

The b10k potentiometer controls the position of the dot on screen to avoid incoming obstacles that move from right to left of screen. The objective of the game is to avoid as many obstacles as possible. Your score increases for each successfully dodged obstacle, and the corresponding score is shown on the 7-segment display.

ADC Component Settings

Name: ADC
Converter Type: SAR
Resolution: 12
Sample Rate: 100 k
Reference: Vdda (Vdda/2)
Input Mode: Single Ended
Samples Averaged: 1
Acquisition Time: 17
Clock Source: External
Clock Frequency: 1 MHz
ANALOG PIN NAME: POT

I2C Component Settings

Name: I2C
Mode: I2C, Master
Data rate: 100 kbps \

SegmentDisplay Component Settings

Name: SegmentDisplay
Number of segments: 8
Segem drive: Active High
Number of comms :1
Com drive active: Low
Timing: Internal clock
Display Refresh rate Hz: 250

Troubleshooting

Make sure all the hardware connections are correctly set up. The SDA and SCL lines for I2C communication should be checked for loose connections.

Authors

[Bitel Damian]

License

This project is licensed under the terms of the MIT license.

psocgame's People

Contributors

biteldamian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.