Page 6 of 8 FirstFirst 12345678 LastLast
Results 51 to 60 of 76

Thread: Fusion Brain program for Linux

  1. #51
    Newbie
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    27

    Question Pwm?

    I'm starting the next stage of expansion for FB in linux, and need some information.

    I'm planning to implement a momentary output method, so that a dbus method can trigger the output for x milliseconds and turn off, with a single dbus call. No problems anticipated there, might do that yet tonight.

    But the other thing I wanted to try this weekend was to get PWM support. Just a guess based on some reading here on the forum, but am I right that where fblib.c is currently setting outputs on with '0b00000001' and off with '0b00000000' (in bytes 0,2,4 etc) that the first seven bits there are what control PWM?

    Since I blew up the power regulator on my FB last night I'm not sure I can test this any time soon, do the onboard LEDs reflect the PWM state? (it still works off USB power, but outputs aren't usable without the 12v, right?)

    Also, what are the odd-numbered of the first 32 bytes used for -the even ones are outputs, and the upper 32 bytes are analog inputs, but I don't know what (if anything) can be done with the other 16 bytes.

    Oh, and the next step I'm interested in pursuing after those two is to try to support multiple FBs. I'm open to suggestions as to interface semantics, (use same dbus object with a field to choose different brains? Or multiple dbus interfaces?) and I wanted to ask how MDX identifies specific brains when more than one are connected. Could be irritating, humorous, or catastrophic to mix up two different brains...

    j

    (friggin forum software thinks it's smarter than me, keeps un-capitalizing PWM in the title...)

  2. #52
    Newbie
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    27
    Update: I still don't know how to use PWM. I've got MomentarySingleOutput() working, BUT: subsequent dbus calls to fbd are queued up and only take place after the delay, so it seems I'll have to rethink and rewrite.

    j

  3. #53
    Variable Bitrate red_parchel's Avatar
    Join Date
    Jul 2006
    Location
    Boston, Ma
    Posts
    280
    I'm not too much of a programmer, but I know a little perl.

    before I go and spend the extra money on an FB, I wanted to run my thought by everyone to see if there were any immediate problems with my idea.

    I'd like to write a gtk2 app in perl that makes dbus calls to fbd and turns on and off some relays. if I can make THAT work I'll think about expanding to other things.

    Also if anyone has some tips on how to "integrate" my app into nGhost i'm all ears.
    MobileThree: in car - Zotac Atom/ION - linuxICE 2.0.2

    --worklog--

  4. #54
    Newbie
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    27
    Quote Originally Posted by red_parchel View Post
    I'm not too much of a programmer, but I know a little perl.

    before I go and spend the extra money on an FB, I wanted to run my thought by everyone to see if there were any immediate problems with my idea.

    I'd like to write a gtk2 app in perl that makes dbus calls to fbd and turns on and off some relays. if I can make THAT work I'll think about expanding to other things.

    Also if anyone has some tips on how to "integrate" my app into nGhost i'm all ears.
    Something like:
    Code:
    use Net::DBus;
    my $fb = Net::DBus->session
        ->get_service('org.openice.fbd')
        ->get_object('/org/openice/fbd')
    ;
    $fb->SetSingleOutput(3,1);
    could be used to turn on output 3. (silkscreened '4' on board) I can't help with the nGhost end of things though.

    j

  5. #55
    Variable Bitrate red_parchel's Avatar
    Join Date
    Jul 2006
    Location
    Boston, Ma
    Posts
    280
    Quote Originally Posted by newkirk View Post
    Something like:
    Code:
    use Net::DBus;
    my $fb = Net::DBus->session
        ->get_service('org.openice.fbd')
        ->get_object('/org/openice/fbd')
    ;
    $fb->SetSingleOutput(3,1);
    could be used to turn on output 3. (silkscreened '4' on board) I can't help with the nGhost end of things though.

    j
    spot on! thanks a bunch now to code up a simple gtk2 gui and wait for my FB to be delivered!
    MobileThree: in car - Zotac Atom/ION - linuxICE 2.0.2

    --worklog--

  6. #56
    Newbie
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    27

    oops

    I got around to looking at and testing this, and realized I screwed up. It should be "my $fb = Net::DBus->system", since we're dealing with system bus instead of session bus.

    j


    Quote Originally Posted by newkirk View Post
    Something like:
    Code:
    use Net::DBus;
    my $fb = Net::DBus->session
        ->get_service('org.openice.fbd')
        ->get_object('/org/openice/fbd')
    ;
    $fb->SetSingleOutput(3,1);
    could be used to turn on output 3. (silkscreened '4' on board) I can't help with the nGhost end of things though.

    j

  7. #57
    Newbie
    Join Date
    Aug 2009
    Posts
    15

  8. #58
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,153
    Blog Entries
    51
    i think there's something wrong with your program man there's no .exe file.
    free bump
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  9. #59
    Newbie
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    27
    Quote Originally Posted by Sonicxtacy02 View Post
    i think there's something wrong with your program man there's no .exe file.
    free bump
    Ummm, what program are you referring to? And why are you looking for a .exe file for a linux program anyway?

    j

  10. #60
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    I think he is jesting... If I remember correctly he is a linux man, he knows there arent any exe's, just giving the thread a bump.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

Page 6 of 8 FirstFirst 12345678 LastLast

Similar Threads

  1. *NEW* USB Input/Output Board -- Fusion Brain
    By 2k1Toaster in forum Fusion Brain
    Replies: 1123
    Last Post: 02-22-2010, 02:33 AM
  2. Replies: 17
    Last Post: 01-16-2009, 09:48 AM
  3. Replies: 3
    Last Post: 09-23-2008, 09:00 PM
  4. How to add a Fusion Brain instance to your configuration file
    By 2k1Toaster in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 06-07-2008, 08:42 AM
  5. Noob has some biginner questions about the Fusion Brain
    By phreaknes in forum Fusion Brain
    Replies: 14
    Last Post: 04-29-2008, 02:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •