Close
0%
0%

SciFixer

Multiplatform retro-game, inspired by SciFi contest art :)

Similar projects worth following
It's XXII century. You are a cyborg - cybernetic organism, half human, half robot. You must fix current state of the science - punch all fake scientists in the face and save real scientists from extinction...

This project number 20,000 was specifically created for Sci-Fi contest on Hackaday and was inspired by art from contest page ;)

Idea was to create retro-looking game for a number of platforms:

  • Xorya
  • IBM PCjr
  • ZX-Spectrum
  • Timex Sinclair 2068 (it was US extension of ZX architecture)

So I started with Xorya (see https://hackaday.io/project/5507-xorya-extremely-low-cost-game-console-on-pic32 ), but in order to qualify it has to have something new, so I decided that NEW feature of Xorya will be touch interface that should significantly decrease cost of the final product (no more buttons or analog joysticks), so schematics are the same:

But additionally it has 4 square pads, connected to RB8, RB9, RB10 and RB11...

  • Video demonstration of touch interface

    Shaos03/07/2017 at 04:54 0 comments
  • Reading touch sensors

    Shaos03/06/2017 at 07:52 0 comments

    In order to read touch sensors (they will be implemented as part of PCB) we need to connect internal pull-ups to those pins then to read we should set pins out, clear pins and set pins in then read a few times (until parasitic capacitor is fully charged through internal pull-up) and analyze (touched pads charge longer):

    int tch[4],cc[5],c,i;
    ConfigCNBPullups(CNB8_PULLUP_ENABLE|CNB9_PULLUP_ENABLE|CNB10_PULLUP_ENABLE|CNB11_PULLUP_ENABLE);
    ....
    // somewhere in the game loop:
     tch[0]=tch[1]=tch[2]=tch[3]=5;
     mPORTBSetPinsDigitalOut(BIT_8|BIT_9|BIT_10|BIT_11);
     mPORTBClearBits(BIT_8|BIT_9|BIT_10|BIT_11);
     mPORTBSetPinsDigitalIn(BIT_8|BIT_9|BIT_10|BIT_11);
     cc[0] = mPORTBRead();
     cc[1] = mPORTBRead();
     cc[2] = mPORTBRead();
     cc[3] = mPORTBRead();
     cc[4] = mPORTBRead();
     for(i=0;i<5;i++)
     {
      c = cc[i];
      if((c&BIT_8) && tch[0]==5) tch[0]=i;
      if((c&BIT_9) && tch[1]==5) tch[1]=i;
      if((c&BIT_10) && tch[2]==5) tch[2]=i;
      if((c&BIT_11) && tch[3]==5) tch[3]=i;
    }
    tch[4] are states for 4 touch sensors - if respective number is greater than 1 then sensor is "touched". Experiment showed that if nothing is touched array will have all 1s, but if one or more sensors touched - respective value will go up (usually 3 if one sensor was touched or 2 if more than one sensor were touched). Interesting fact that it's relatively easy to detect intermediate finger position when it touches 2 neighboring sensors so with 4 pads we got 8 positions (or even 9 if we count center position as well).

  • First run

    Shaos03/06/2017 at 06:02 0 comments

    Xorya-touch in action (connected to TV and PICKit3):

    for now it shows static image 320x200 with 2 half-frames (it's drawn as 160x400 with interlace):

  • Xorya-touch

    Shaos03/06/2017 at 05:59 0 comments

    This is the next prototype of #XORYA - extremely low cost game console on PIC32 with capacitance touch interface where 4 pads connected to RB8, RB9, RB10 and RB11 (and there is a ground ring around them):

    Pads covered by scotch tape because we will measure capacitance of the "touch"...

View all 4 project logs

Enjoy this project?

Share      

Discussions

Aleksandar Bradic wrote 02/28/2017 at 21:08 point

Project No. 20,000 ;) That must be worth something :P  

  Are you sure? yes | no

Shaos wrote 03/04/2017 at 01:09 point

Sorry, I tricked your system a little ;)

But I really wanted this number :)

  Are you sure? yes | no

Aleksandar Bradic wrote 03/04/2017 at 01:16 point

hahah I see what you did :) 

  Are you sure? yes | no

Shaos wrote 03/04/2017 at 01:39 point

I promise, it will never happen again :)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 02/25/2017 at 21:13 point

knock knock :-)

  Are you sure? yes | no

Shaos wrote 02/26/2017 at 00:40 point

who is there? ;)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 02/26/2017 at 00:45 point

a guy who's curious about this mysterious empty placeholder ;-)

  Are you sure? yes | no

Shaos wrote 02/26/2017 at 00:49 point

I'm still not exactly sure that I have time to do that :)

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates