Shop OBEX P1 Docs P2 Docs Learn Events
Propeller based IRC Client / Bot — Parallax Forums

Propeller based IRC Client / Bot

Harrison.Harrison. Posts: 484
edited 2008-03-12 01:17 in Propeller 1
I've been working on a very rudimentary irc client / bot for the Propeller. I set it to join the #propeller channel on irc.freenode.net today and forum members there seemed very interested.

It currently responds to a few commands to prove that it does work. I've attached a snippet of the source code along with some pictures of it in action for your enjoyment. I'll post the full sources after I fix some bugs in the sockets / ethernet driver.

Any suggestions on how to efficiently parse the incoming text would be greatly appreciated. I remembered seeing some sort of string utility object, but I can't seem to find it anywhere.

Harrison
1024 x 768 - 154K
800 x 600 - 110K
644 x 404 - 67K

Comments

  • AleAle Posts: 2,363
    edited 2008-03-07 07:58
    Hei I saw it working ... in real time yesterday, cool, I have my client open 24 hs.
    Which problem do you have with your display ?, I assume is a 320x200 or 320x200 with or w/o controller ?
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-07 08:04
    Looks great. Maybe soon we can do everything on props and forget normal computers and forget all their problems smile.gif
  • dfletchdfletch Posts: 165
    edited 2008-03-08 20:34
    It got a pair of dice today and we're role playing smile.gif

    The temperature in Texas still seems to be zero, so I think that still needs work wink.gif

    This is a really fun way to see the Prop in action!

    Cheers,

    --fletch

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Join us in the Un-Official Propeller IRC channel: irc.freenode.net #propeller
    Newbies, oldies, programmers, math professors, and everyone in-between welcome!
    Propeller IRC howto
    spinc - open source Spin compiler
  • computer guycomputer guy Posts: 1,113
    edited 2008-03-08 21:55
    Wow.

    This could be the next "Y-Box" style device. If you can get it to fit in an altoids tin that is. smile.gif

    Looks great!

    edit: I have just been online and chatting to it and it truly is fantastic.

    Commands that work are currently.
    %p temp
    
    %p d10
    
    %p d20
    
    %p on
    
    %p off
    
    %p hello
    
    


    Sorry if I missed any.

    Everyone go online and check this out. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Stickers for sale

    Post Edited (computer guy) : 3/8/2008 10:55:34 PM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2008-03-08 23:12
    This may help with your string parsing.

    obex.parallax.com/objects/230/

    It is designed so that you tell it what comes before / after the data you want and it will tell you what is in the middle.

    For example
    DAT
      instr BYTE "hex representation 0x13Ab is 5035 decimal",0 
    
    
    Pub main
    fmt.sscanf(@instr,string("hex representation 0x%x is 5035 decimal"),@value)
    fmt.sprintf(@buffer,string("scanned value is %d%% decimal\a\\\t\r\n"),value)
    
    



    Should return "Scanned value is 0x13Ab decimal 5035".

    Good luck. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Stickers for sale
  • tpw_mantpw_man Posts: 276
    edited 2008-03-09 00:12
    Harrison, can you test my code for greeting a person that has just logged on? I do not have the hardware, so I cannot do it smilewinkgrin.gif Thanks. UPDATE: Attached new code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1010, so be surprised!

    Post Edited (tpw_man) : 3/9/2008 7:03:01 PM GMT
  • Jasper_MJasper_M Posts: 222
    edited 2008-03-09 00:56
    : ) Yeah, it's sure nice to have a Propeller on #propeller. I think I'll order the Microchip ethernet chip some day...But I have to order it from Microchip directly...
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-09 01:01
    Neat! Now we just need to add the 40 column screen driver and take some input from local keyboard. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • computer guycomputer guy Posts: 1,113
    edited 2008-03-09 21:08
    I ordered a propnic last night.
    Harrison, do you mind if I help write the software?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Stickers for sale
  • tpw_mantpw_man Posts: 276
    edited 2008-03-09 23:52
    Proptcp can now greet people who have just logged in.
    proptcp said...

    [noparse][[/noparse]19:36] --> random_person has joined this channel (i=46100022@gateway/web/ajax/mibbit.com/x-670ac356a6816b9a).
    [noparse][[/noparse]19:36] <proptcp> Welcome to the Propeller IRC channel, random_person. I am proptcp, the propeller-based IRC bot.
    That is from my IRC client, Konversation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1010, so be surprised!
  • computer guycomputer guy Posts: 1,113
    edited 2008-03-10 10:09
    edit:

    I have removed the TV version of the code as it has changed allot.
    I will upload it as soon as it has been tested. This will be late next week.

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Stickers for sale

    Post Edited (computer guy) : 3/11/2008 8:45:51 AM GMT
  • Harrison.Harrison. Posts: 484
    edited 2008-03-11 04:07
    I got bored again today and decided to make a real irc client based on the ideas from all the guys in the irc channel. The client took quite a bit of work, mainly due to parsing errors and battling with the display driver.

    I ended up with a functioning client that is hard coded to join the #propeller channel on irc.freenode.net. It has keyboard support, with backspace and blinking cursor support. The screen is split into 3 regions: a blue chat region, a green text input region, and a black raw irc region.

    I'm still working on fixing a few minor bugs (like lost of connectivity). I'll post the code tomorrow (someone may need to bug me about this).

    Harrison
    1024 x 768 - 151K
    1024 x 768 - 127K
  • DgswanerDgswaner Posts: 795
    edited 2008-03-11 20:44
    I had an Idea like this except using a PC based chatbot to add "personality" to a robot, using voice recognition as the input to the chat program and text to speech output instead of a screen. this in theory would allow you to have a conversation with your bot, but would require a PC. If this could be done with a prop that would be even better. and I'd settle for text speech out, and input via an IR remote.

    do you think this is beyond the capabilities of what you're doing?

    Is your code going to be Ybox2 Friendly?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-11 21:07
    @Harrison

    Awesome! Hope you don't mind if I do a AiGenericText knockoff of this for those of us
    using composite/TV screens. [noparse]:)[/noparse]

    --

    Someone was working on getting the Propeller to speak using wav files,
    (rayman maybe) Perhaps at speaking IRC client could be completely
    prop based. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-11 22:43
    Harrison.

    I enjoyed having a look at your project. It's a great idea and looks like fun to build/program. I look forward to your future updates. yeah.gif

    Bob

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob

    Post Edited (Bob Lawrence (VE1RLL)) : 3/12/2008 12:00:22 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-11 22:44
    Excellent work Harrison, do you have a name for your project? If not, how about calling·it IRCsome, or PIRC (pronounced perk)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • computer guycomputer guy Posts: 1,113
    edited 2008-03-12 01:17
    For those interesed I am developing a TV version of this. [noparse]:)[/noparse]
    Code should be uploaded by the end of next week.

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Stickers for sale

    Post Edited (computer guy) : 3/12/2008 4:28:47 AM GMT
Sign In or Register to comment.