Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Rotate Images, Logic Builder, Counters

  1. #11
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    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

  2. #12
    Constant Bitrate
    Join Date
    Jun 2008
    Location
    Georgia, USA
    Posts
    188
    Quote Originally Posted by keyvan View Post
    Hey Dan thanks for your reply, could you please elaborate, perhaps provide a link? I'd love to be exposed to all the options so as to pick the best one. In return I will keep you all posted and post pics and tutorials and whatnot.
    Well, I maybe spoke before reading every word of your post. I was thinking of speedometer pulse generators for cars, not motorcycles.

    If a bike has the same mounting method as a car, you might be able to use one.

    Here is a link to a Dakota Digital unit from Summit Racing:

    http://store.summitracing.com/partde...5&autoview=sku
    Thanks,

    Dan

  3. #13
    Low Bitrate keyvan's Avatar
    Join Date
    Dec 2005
    Location
    Orange County, CA
    Posts
    67
    I changed my then statement to read d+1, it counts, except the condition is maintained as true when I have the photointerrupter interrupted, so the counter just keeps counting as the timer loops.... Is there a way to have it count ONCE per condition? Or say, every time the voltage changes by a range of 3 volts or more, add 1 to the counter variable?

    Thanks.

    Dan thanks for the link, that might be useful if I can't manage to do it this way...
    -------------------
    1997 Mazda Miata, Black
    MiataPC
    In-dash Fabrication
    Current dashboard: http://www.aescarpc.com/miatapc/2

  4. #14
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Quote Originally Posted by keyvan View Post
    I changed my then statement to read d+1, it counts, except the condition is maintained as true when I have the photointerrupter interrupted, so the counter just keeps counting as the timer loops.... Is there a way to have it count ONCE per condition? Or say, every time the voltage changes by a range of 3 volts or more, add 1 to the counter variable?

    Thanks.

    Dan thanks for the link, that might be useful if I can't manage to do it this way...
    need more logic then.

    easiest is like this...

    logic 1:
    if input > value then variable++ else variable=0

    logic 2:
    if variable == 1 then count_variable++ else nothing

    without thinking all the way through this I think that does what you want. Still on vacation mode
    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

  5. #15
    Low Bitrate keyvan's Avatar
    Join Date
    Dec 2005
    Location
    Orange County, CA
    Posts
    67
    hey thanks nick, ill try it when i get home and let you know

    EDIT:

    I tried that. set up another variable, so to restate, this is what i did:

    Logic 1: If Input > 1 then x++ (Vote Opinion: d+1), else x=0 (VO: 0)
    That works, if the input is 5v (Sensor blocked), x keeps increasing, when I unblock the sensor, x returns to 0.

    Logic 2: If x=1, then y++ (VO: d+1), else nothing.

    Here's what happens when I test:
    Interrupted: x increases constantly, and y increases constantly as well! Doesn't follow the logic!
    Uninterrupted: x reverts to 0, y stays at whatever value it was at last (this is fine).

    Why does y continue to increase even though x is no longer equal to zero and is continuing to increase? The state of x=1 should be false as soon as x no longer equals 1 and continues to climb, thus y should not increase anymore, it should only have increased one time.

    EDIT: Got it working, see my next post.
    Attached Images Attached Images  
    -------------------
    1997 Mazda Miata, Black
    MiataPC
    In-dash Fabrication
    Current dashboard: http://www.aescarpc.com/miatapc/2

  6. #16
    Low Bitrate keyvan's Avatar
    Join Date
    Dec 2005
    Location
    Orange County, CA
    Posts
    67
    Found a fix.

    I changed logic 2, it is now the following:

    When x is greater than 0 and less than 2 (so when x=1), then do y++.

    Works now, attached logic diagram (I'm trying to be as thorough as possible to help others )

    Nick, why didn't the first way work? Is the "==" module bugged?


    So I tried testing this by running a comb through the photointerrupter... It fails to count every tooth... And about 30% of the time, it counts it twice... even if I run it through pretty slowly. If you care, I can take a video of the screen and the comb and the values of the variables. For my purposes I might just have to use a different method altogether. Would have been nice to use the photointerrupter though since I've now got it working in fusion brain (for the most part.)


    Right now the logic function is not between 0 and 2, it's between 0.9 and 1.1, i thought that might decrease the likelyhood of error, but doesn't seem to have made a difference.
    Attached Images Attached Images  
    -------------------
    1997 Mazda Miata, Black
    MiataPC
    In-dash Fabrication
    Current dashboard: http://www.aescarpc.com/miatapc/2

  7. #17
    Low Bitrate keyvan's Avatar
    Join Date
    Dec 2005
    Location
    Orange County, CA
    Posts
    67
    Quote Originally Posted by 2k1Toaster View Post
    Thanks for the praise!
    In one of the earlier versions there is a gtr inspired skin that is ina folder in the MDX source directory or maybe the bin/debug area with the name of gtr or str or something like that. If you cant find it I will see if Tim has a copy he can post up.
    There was no rotating image in there that I could find, only static, multi, and variable-location. I'll dig deeper and see if at least the settings are there....

    But that's fine because the skin just showed me the idea of having a gauge within which a bar fills up, which is actually a lot cooler to me than an arrow pointing to a value like a conventional gauge.
    -------------------
    1997 Mazda Miata, Black
    MiataPC
    In-dash Fabrication
    Current dashboard: http://www.aescarpc.com/miatapc/2

  8. #18
    Low Bitrate
    Join Date
    Dec 2007
    Posts
    105
    If you do a search in google for freq to voltage you will find a few million links. Or do a search for LM2907. That will get you what you want.

  9. #19
    Low Bitrate keyvan's Avatar
    Join Date
    Dec 2005
    Location
    Orange County, CA
    Posts
    67
    Quote Originally Posted by RonS View Post
    If you do a search in google for freq to voltage you will find a few million links. Or do a search for LM2907. That will get you what you want.
    Thanks, this thread has become a very good reference for me. I'll look into this if my microcontroller route doesnt work out. Not sure if I mentioned this already, but I'm just going to program a microcontroller to do this job.. you can see my AVRFreaks forum post here: (some good advice there too, and another world for those that want to try something a little bit more in-depth than the fusion brain, although I'm going to interface my MCU back into the fusion brain for displaying everything): http://www.avrfreaks.net/index.php?n...=528752#528752

    NICK, I have another question for ya:

    If my signal is about 5.10v, will it register on the FB? Will it fry it?

    When my fuel gauge is empty, and the engine is on, the voltage sits between 5.02v and 5.09v..... I am hoping I don't have to use a voltage divider for this. Else, I would just make my "empty" occur one notch sooner on the fusion brain, right before I get to 5 volts.. I just don't want to end up riding it all the way to empty empty one day and fry my FB in the meantime.

    Thanks
    -------------------
    1997 Mazda Miata, Black
    MiataPC
    In-dash Fabrication
    Current dashboard: http://www.aescarpc.com/miatapc/2

  10. #20
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Anything above 5v is not good for the FB and you risk damage. You arent over that much so the microchip itself should be ok (no guarentees) but it will only read in 5v, it will not read in 5.xx.
    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 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. MDX and COM big update
    By 2k1Toaster in forum FB Software
    Replies: 62
    Last Post: 02-18-2010, 09:43 PM
  2. Replies: 41
    Last Post: 01-11-2009, 03:46 PM
  3. How to use a configuration file created by the Configurator with MDX
    By 2k1Toaster in forum FB Documentation and Tutorials
    Replies: 15
    Last Post: 09-08-2008, 05:36 PM
  4. Quick overview of the Fusion Control Centre MDX Configurator
    By 2k1Toaster in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 06-06-2008, 06:17 AM
  5. Access 2003 help needed
    By veedubya in forum Off Topic
    Replies: 2
    Last Post: 05-31-2006, 07:49 PM

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
  •