Shop OBEX P1 Docs P2 Docs Learn Events
DEFCON 22 Badge: Code, Schematics and Information Here! - Page 5 — Parallax Forums

DEFCON 22 Badge: Code, Schematics and Information Here!

1235»

Comments

  • PublisonPublison Posts: 12,366
    edited 2014-08-26 03:08
    I wonder if one of these could be used instead of the IC/Photodiode combination?
  • Ken GraceyKen Gracey Posts: 7,388
    edited 2014-08-26 10:16
    Ken Gracey wrote: »
    shadsterr, how about sending it to me and I'll repair it professionally and return it?

    Ken Gracey
    Parallax Inc.
    599 Menlo Drive
    Rocklin, CA 95765

    shadsterrr, I have your badge and I've swapped it out for a brand new one. I only need your shipping address. I sent you a PM but I don't know if you have e-mail notification turned on so I'll try to catch you here.

    - Ken Gracey
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-28 10:58
    Would the following Parallax products work as a substitute for the IR circuitry on the DEFCON badge for use with a QuickStart board?

    http://www.parallax.com/product/350-00039

    http://www.parallax.com/product/350-00003

    They're on sale for 10% off now so it would be a good time to order! :-)
  • PublisonPublison Posts: 12,366
    edited 2014-08-28 11:32
    Hope JonnyMac will chime in. He helped design it.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-29 08:00
    David Betz wrote: »
    Would the following Parallax products work as a substitute for the IR circuitry on the DEFCON badge for use with a QuickStart board?

    http://www.parallax.com/product/350-00039

    http://www.parallax.com/product/350-00003

    They're on sale for 10% off now so it would be a good time to order! :-)
    It sounds like these will work with a few caveats so I now have two of each on order at 10% off!
  • PublisonPublison Posts: 12,366
    edited 2014-08-29 08:14
    They may work. Haven't check the voltages to see if they would be compatible. They are 38KHZ IR devices. The code would have to change, but they would not be able to talk to the stock badges as there are set to 36KHZ.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-08-29 09:11
    Publison wrote: »
    They may work. Haven't check the voltages to see if they would be compatible. They are 38KHZ IR devices. The code would have to change, but they would not be able to talk to the stock badges as there are set to 36KHZ.
    I guess it's a good thing I ordered two each IR sensors and IR LEDs. That way I can two Quickstart boards to talk to each other even if I can't get a Quickstart board to talk to a DEFCON badge.
  • RS_JimRS_Jim Posts: 1,764
    edited 2014-09-03 08:12
    Ken Gracey wrote: »
    But the BOM should be present on the first post of this thread. I'll post it tomorrow if it's not already there. . .

    Ken Gracey
    Did this ever happen? A customer gave me his 22 badge, so I would like to build one on a QS board to talk to it!
    Jim
  • GenetixGenetix Posts: 1,754
    edited 2014-09-03 13:22
    Jim, Ken probably got side tracked by all the other things going on at Parallax. Most of the parts appear to be standard except for IR detector and the IC it's connected to. Can you read a part number for the IR detector and what about the nearby IC?
  • PublisonPublison Posts: 12,366
    edited 2014-09-03 13:50
    Genetix wrote: »
    Jim, Ken probably got side tracked by all the other things going on at Parallax. Most of the parts appear to be standard except for IR detector and the IC it's connected to. Can you read a part number for the IR detector and what about the nearby IC?

    I think I covered that in Post #120.

    This is what I got from the Diptrace drawing.
  • TokenToken Posts: 9
    edited 2014-09-03 17:39
    Genetix wrote: »
    Token, Is there anything In particular that you don't understand or have a question on. Feel free to ask.

    Replicnt, give Parallax Technical Support a call.

    Thanks!
    sent you a real DEFCON 22 badge for creating C/C++ code from our original source code.

    Nice. Looks like this was completed today?
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-03 17:50
    Token wrote: »
    Thanks!
    sent you a real DEFCON 22 badge for creating C/C++ code from our original source code.

    Nice. Looks like this was completed today?
    I finished converting the Spin code that is actually used. There are a couple of objects and functions that are in the Spin code that aren't ever called by the main code. I'd like to verify that it can talk to another DEFCON badge before releasing the code though. I ordered an IR sensor and LED that I'm going to try hooking up to a Quickstart to serve as a badge clone so I can test badge-to-clone-badge communications.
  • RS_JimRS_Jim Posts: 1,764
    edited 2014-09-04 06:46
    Did you get the badges to communicate?
    Jim
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-04 07:16
    RS_Jim wrote: »
    Did you get the badges to communicate?
    Jim
    I was able to run JonnyMac's IR test program that allows a single badge to talk to itself. I don't have two badges so I don't know if two can talk to each other.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-05 10:02
    Does anyone out here have more than one DEFCON badge? If so, would you be willing to test my C++ translation of the code to see if it can communicate with a badge programmed with JonnyMac's original Spin code?
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-05 19:25
    It's beginning to look like I won't be able to test the C++ version of the badge code much further so I'm going to post it here in case anyone wants to take a look at it. I took JonnyMac's code and converted each Spin object to a C++ class and I moved the LED animation code into a class as well. Each class has a header file and a .cpp file containing its implementation. The main code is kind of messy because it still contains commented out Spin code that I haven't yet translated to C++ but none of that code was actually used by Jon's badge code so it shouldn't prevent the C++ badge code from working. I can translate that as well if people want to play with it along with the i2c and pwm drivers that were also unused. I'll wait to see if there is any interest in those pieces before doing the work though.

    Anyway, here is the code. I think it follows Jon's code pretty well and I've left all of his comments in the C++ code. This zip file includes a PropGCC makefile that will build the program but it also includes a file called badge.binary that is a Spin binary that you can load with any Spin loader like the one in the Propeller Tool or the one in SimpleIDE for those who don't want to build it from sources.

    Feel free to post comments and bug reports.

    Thanks,
    David

    badge.zip
  • GenetixGenetix Posts: 1,754
    edited 2014-09-13 19:28
    I got a QuickStart today and after changing P27 to P7, P26 to P6, P25 to P5, and P24 to P4 I was able to run the Human code.
    Is it me or when the code throws out random commands (before you press a button) are they in different places on the screen? I was using the Parallax Serial Terminal and at first all I got was garbage until I changed the Baud Rate to 57600. Most Spin programs I've seen use 115,200.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-13 19:36
    Genetix wrote: »
    I got a QuickStart today and after changing P27 to P7, P26 to P6, P25 to P5, and P24 to P4 I was able to run the Human code.
    Is it me or when the code throws out random commands (before you press a button) are they in different places on the screen? I was using the Parallax Serial Terminal and at first all I got was garbage until I changed the Baud Rate to 57600. Most Spin programs I've seen use 115,200.
    Each message begins with a different number of spaces.
  • GenetixGenetix Posts: 1,754
    edited 2014-09-13 19:46
    David Betz wrote: »
    Each message begins with a different number of spaces.

    Thanks, I will look at the code again because I don't remember seeing that unless it's randomly generated also.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-13 19:50
    Genetix wrote: »
    Thanks, I will look at the code again because I don't remember seeing that unless it's randomly generated also.
    Yes, it is a random number of spaces:
      repeat until (read_pads <> %0000)                             ' wait for a pad press
        idx := (prng.random >> 1) // 13
        repeat (idx << 1)
          term.tx(" ")
        idx := (prng.random >> 1) // 13
        term.caesar(@@Commands[idx])
        if (check_ir)
          quit
        pause(250)
    
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-13 19:57
    Genetix wrote: »
    I got a QuickStart today and after changing P27 to P7, P26 to P6, P25 to P5, and P24 to P4 I was able to run the Human code.
    Is it me or when the code throws out random commands (before you press a button) are they in different places on the screen? I was using the Parallax Serial Terminal and at first all I got was garbage until I changed the Baud Rate to 57600. Most Spin programs I've seen use 115,200.
    Do you intend to try to get the IR working on the Quickstart board? What IR receiver will you use?
  • GenetixGenetix Posts: 1,754
    edited 2014-09-13 23:52
    David Betz wrote: »
    Do you intend to try to get the IR working on the Quickstart board? What IR receiver will you use?

    I have quite a few IR LEDs and IR Receivers/Detectors from Stamp kits. They are 38 kHz devices but the Boe-Bot Text shows they still work but are less sensitive at 36 kHz.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-16 14:46
    David Betz wrote: »
    It's beginning to look like I won't be able to test the C++ version of the badge code much further so I'm going to post it here in case anyone wants to take a look at it. I took JonnyMac's code and converted each Spin object to a C++ class and I moved the LED animation code into a class as well. Each class has a header file and a .cpp file containing its implementation. The main code is kind of messy because it still contains commented out Spin code that I haven't yet translated to C++ but none of that code was actually used by Jon's badge code so it shouldn't prevent the C++ badge code from working. I can translate that as well if people want to play with it along with the i2c and pwm drivers that were also unused. I'll wait to see if there is any interest in those pieces before doing the work though.

    Anyway, here is the code. I think it follows Jon's code pretty well and I've left all of his comments in the C++ code. This zip file includes a PropGCC makefile that will build the program but it also includes a file called badge.binary that is a Spin binary that you can load with any Spin loader like the one in the Propeller Tool or the one in SimpleIDE for those who don't want to build it from sources.

    Feel free to post comments and bug reports.

    Thanks,
    David

    badge.zip

    Here is an update to my C++ translation of the DEFCON badge code. This includes a SimpleIDE project so it should be more accessible to people who don't use command line tools.

    DEFCON-22-Badge.zip
  • PublisonPublison Posts: 12,366
    edited 2014-09-21 16:17
    Can anyone generate a Gerber zip from the Diptrace files in post#1?

    I have the free version and it looks like I'm 41 pins over the limit. 'Doesn't look like a lot of pins, but there are 63 vias.

    I'm looking at a price to get a couple of these and Jon's IronMac Shield made. I'm tying to get a panel made.

    Jim
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 16:57
    Publison wrote: »
    Can anyone generate a Gerber zip from the Diptrace files in post#1?

    I have the free version and it looks like I'm 41 pins over the limit. 'Doesn't look like a lot of pins, but there are 63 vias.

    I'm looking at a price to get a couple of these and Jon's IronMac Shield made. I'm tying to get a panel made.

    Jim
    Nice! Good luck. I'm sure you'll find takers if you make a batch of these.
  • Ken GraceyKen Gracey Posts: 7,388
    edited 2014-10-02 12:35
    The first post has been updated to include David Betz's port of the Spin/ASM badge code to C. Thanks David!

    Ken Gracey
  • David BetzDavid Betz Posts: 14,516
    edited 2014-10-02 12:37
    Ken Gracey wrote: »
    The first post has been updated to include David Betz's port of the Spin/ASM badge code to C. Thanks David!

    Ken Gracey
    Thanks Ken! It's actually a port to C++. I thought that C++ matched Spin better than C.
Sign In or Register to comment.