Shop OBEX P1 Docs P2 Docs Learn Events
Programming with C#? — Parallax Forums

Programming with C#?

ThePwnStickThePwnStick Posts: 6
edited 2008-12-11 14:53 in Propeller 1
Hi all.
Is there any way to program for the Propeller with C#?

Or a C# to Spin converter?

I don't really want to learn a whole new programming language.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-11 03:28
    ThePwnStick said...
    I don't really want to learn a whole new programming language.
    Why not? You're not over the hill yet, are you? Consider it an opportunity for personal growth. The more languages you know, the better your programming in any one of them will become.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!
  • JerryNJerryN Posts: 32
    edited 2008-12-11 03:50
    See imagecraft.com/ . Personally, I prefer Spin to c but in either case you will probably need to learn how to program the propeller in assembly if you have any I/O that needs to be fast.

    I AM over the hill! C seems like a big kluge to me - what I really liked was Pascal!

    (old) Jerry
  • ThePwnStickThePwnStick Posts: 6
    edited 2008-12-11 04:09
    JerryN: That's C. Not C#.

    PhiPi: Oh ok. I'll try.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-12-11 12:16
    I think using C (or C#) to program the propeller is like trying to use a mouse and keyboard to control your TV (for want of a better analogy). You can do it, but what's the point. The simpler remote is better suited to the device being controlled and was custom made for it.

    Besides, I'm with Phil. I've learned many programming languages over the years. The more languages you learn, the more you understand the broader concepts and the less the differences between languages matter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 12/11/2008 12:25:42 PM GMT
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-12-11 12:54
    I have been doing some porting from spin to C. It should take you little time to do the switch. Here is a small example.
    void test (void){
        int a;
        for(a=0;a<10;a++)
            textdec(a);
    }
    
    in spin
    
    pub test|a
    repeat a from 0 to 9
       text.dec(a)
    
    
    
    



    You have to watch your indentation but you have more tools at your disposal in some things like elseif etc. Many things are much simpler to implement as spin is really in my mind like an optimized C expressly for microcontrollers.
  • mcstarmcstar Posts: 144
    edited 2008-12-11 14:53
    Heck, you could skip spin altogether and go straight to assembly. Surely it will help you write better C# code.
Sign In or Register to comment.