Results 1 to 2 of 2

Thread: How do I Skin Analog Inputs?

  1. #1
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286

    How do I Skin Analog Inputs?

    From the big, long thread in post 455, I found:

    Quote Originally Posted by 2k1Toaster View Post
    Code:
    ...
    
    Analogue Input Ports
    #STARTNEW#
      #NAME#
      #TYPE#
      #SETTINGS#
      #VIDPID#
      #IMAGESTATIC#
      #SIZE#
      #LOCATION#
      #SHOWTEXT#
      #PAGE#
      #PORT#
      #TXTCOLOUR#
      #BORDERSIZE#
      #FONT#
      #PLOTLENGTH#
      #MULTILEVELGRAPHICS#
      #HIGHTHRESHHOLD#
      #LOWTHRESHHOLD#
      #HIGHKEYSEQUENCE#
      #HIGHMAINWINDOWTITLE#
      #HIGHSUBWINDOWTITLE#
      #HIGHMAINCLASS#
      #HIGHSUBCLASS#
      #LOWKEYSEQUENCE#
      #LOWMAINWINDOWTITLE#
      #LOWSUBWINDOWTITLE#
      #LOWMAINCLASS#
      #LOWSUBCLASS#
    #ENDNEW#
    
    ...
    And #458

    Quote Originally Posted by 2k1Toaster View Post
    The 5 areas are:

    >>MAIN
    <<END

    >>OUTPUTS
    <<END

    >>AI_INPUTS
    <<END

    >>DI_INPUTS
    <<END

    >>OTHERBUTTONS
    <<END

    To make a button you will need to put it within the needed brackets.
    Its starts with #STARTNEW# and ends with #ENDNEW#

    Then the factors inside are all the options for it. Some are required are some arent. Youll know which ones are required because it wont work or the program will crash.

    In order for the i/o buttons to work they need to know what port they are on. The Ports are 0 index based. And multiple buttons can be assigned to the same port. So on all pages you could have a button for "launch missles" but only on 1 page would there be a confirm or something.

    Now each i/o will also need a PID/VID. For all the ones that are currently out, use the string without quotes "vid_04d8&pid_000c" This is now what allows you to have multiple brains. Just assign different ports with dirrent pid's to different buttons.

    All the outputs need to have #TYPE# of RELAY right now. That is the only working one.

    if there is an animation, it must be #ANIMATION# and then the frames are between {} and the actual on/off states are 1 or 0 seperated by commas. Then 2 colons "::" and how many time to repeat. FOREVER or an integer value. Then the last one is the starting frame seperated by 2 colons again. 0 is what it should be left as.
    And in the Brain/Skins/ Win 25$ thread, post #4

    Quote Originally Posted by 2k1Toaster View Post
    This is the configuration for the Analogue Input Ports as well as an example below:

    Code:
    >>AI_INPUTS
    #STARTNEW#
      #NAME#RAW VOLTAGE
      #TYPE#VOLTAGE
      #SETTINGS#CELCIUS
      #VIDPID#vid_04d8&pid_000c
      #IMAGESTATIC#\Images\BMV2_Button.gif
      #SIZE#190,50
      #LOCATION#80,350
      #SHOWTEXT#true
      #PAGE#0
      #PORT#0
      #TXTCOLOUR#LightGray
      #BORDERSIZE#0
      #FONT#Arial Narrow;18;BOLD
      #PLOTLENGTH#100
    #ENDNEW#
    <<END
    #NAME#Text to Appear
    The Text To Appear is what appears on the button over the image. For example have textual buttons as well as or instead of all graphical buttons/icons.
    #TYPE#ACCELEROMETER|PHOTOELECTRIC|PHOTOELECTRIC|PO TENTIOMETER|TEMPERATURE|VOLTAGE
    The type of the sensor connected to the port. Used to determine how to parse the SETTINGS area.
    #VIDPID#vidpid
    If you use multiple firmware versions, then you need to change this. Default is vid_04d8&pid_000c
    #IMAGESTATIC#path
    #IMAGESTATIC# is the image to display for the input. Follows the same rules as the background image in the main section. The root folder is determined as the folder that the program was launched out of. So if you launch the program from C:\Fusion and have your images in C:\Fusion\images\button1.jpg then path would be \images\button1.jpg
    #SIZE#width, height
    #LOCATION#x,y

    Both comma seperated. for LOCATION 0,0 refers to the top left corner.
    #SHOWTEXT#true|false
    If true then the text from NAME will be displayed on the button otherwise nothing will show.
    #PAGE#x
    Where x is the page where this button will be drawn. 0 is the first page. You can have unlimited amount of pages.
    #PORT#
    This is needed to determine which output this button connects to. Must be a value between 0 and 9 because there are only 10 analogue inputs on the board.
    #TXTCOLOUR#Colour
    The text will be the TXTCOLOURcolour. Needs a name such as Red, Blue, Green, Black, White and other standard colors. Default is LightGray and DarkGray to go with the BMV2 skin.
    #BORDERSIZE#x
    The border around the button. Set to 0 for graphical skins.
    #FONT#name;pt size;extra style
    The font for the text on the button
    #PLOTLENGTH#
    When you draw a graph, this is the number of data points will be stored on the graph. The rest of the points will be stored in a log file.
    #MULTILEVELGRAPHICS#
    #HIGHTHRESHHOLD#
    #LOWTHRESHHOLD#
    #HIGHKEYSEQUENCE#
    #HIGHMAINWINDOWTITLE#
    #HIGHSUBWINDOWTITLE#
    #HIGHMAINCLASS#
    #HIGHSUBCLASS#
    #LOWKEYSEQUENCE#
    #LOWMAINWINDOWTITLE#
    #LOWSUBWINDOWTITLE#
    #LOWMAINCLASS#
    #LOWSUBCLASS#
    #ENDNEW#
    Which is the best writeup so far:

    The black skin has this as the second input:

    Code:
    <<AI_INPUTS
    #STARTNEW#
      #NAME#Volume
      #TYPE#POTENTIOMETER
      #VIDPID#MyBrain0
      #MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png
      #SIZE#92,144
      #LOCATION#24,19
      #SHOWTEXT#false
      #PAGE#0
      #PORT#0
      #BORDERSIZE#0
      #PLOTLENGTH#100
      #HIGHTHRESHHOLD#d0.05
      #LOWTHRESHHOLD#d-0.05
      #HIGHKEYSEQUENCE#DOWN
      #LOWKEYSEQUENCE#UP
      #HIGHMAINWINDOWTITLE#winamp
      #LOWMAINWINDOWTITLE#winamp
    #ENDNEW#
    
    ...
    <<END
    I'm going to need to know more about this, and my apologies if this isn't extremely self explanitory for me:

    with

    Code:
     
    
    
    #MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png
    What does the 0,4.3 stand for?

    Is it a minimum and maximum voltage?

    How does it know what level to increment to the next level of the graphic?

    Is the static image just like a background image for the 'meter'?

    Code:
    
      #HIGHTHRESHHOLD#d0.05
      #LOWTHRESHHOLD#d-0.05
    Is this what tells what each increment is?

    And I have no idea what

    Code:
    
      #HIGHKEYSEQUENCE#DOWN
      #LOWKEYSEQUENCE#UP
    is for...



    Nick did an excellent job describing the first part of the properties for analog inputs (and the others) I just need a little help with the rest now, I'm experimenting on my own, but a little direction may save a lot of trial and error.


    I'm using analog in as a home for what will be analog out to a driver for my fan in the AC circuit,for skin testing purposes. It would be nice if a lot of the same stuff from analog in carried over, so we can see what we're telling something to do without requiring seperate input feedback (that's usually reserved for critical processes in my experience).


    EDIT: I was briefly able to get past the errors enough to see the meat of the analog input editor, that stuff helps a lot, sorry I wasn't able to see that before, the only successes I'm having are trial and error based, using a barebones skin in the editor to see how it's supposed to work, and then using notepad, FCC and debug to implement what I want. It's slow going, but at least I found a way to get some of the reference material I needed.
    It's been a while...

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Whew! That is a long post! Also the skin designer thread is sort of a beginning of documentation. And to make it more complicated, I added at least 4 more commands to the main section alone in the past like 4 hours.

    Ok:

    Quote Originally Posted by h3rk View Post
    I'm going to need to know more about this, and my apologies if this isn't extremely self explanitory for me:

    with

    Code:
     
    #MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png
    What does the 0,4.3 stand for?

    Is it a minimum and maximum voltage?
    Yes. And the units are in voltage.

    Quote Originally Posted by h3rk View Post
    How does it know what level to increment to the next level of the graphic?
    And it automatically determines what image to go to depending on the value and the number of images. If you have 2 images, and a 0-5v range, then between 0 and 2.5v, it will be image #1, and between 2.5 and 5 it will be image 2. If you have 10 images, and it is between 2.0 and 3.0, then between 0 and 2.1 it will be image 1, then between 2.1 and 2.2 it will be image 2, between 2.2 and 2.3 image 3, ect...


    Quote Originally Posted by h3rk View Post
    Is the static image just like a background image for the 'meter'?
    Static image means nothing if you use multiimage. It is exclusive or [XOR] not inclusive or. So it is "either single static image, multiple images, or rotating image".

    Quote Originally Posted by h3rk View Post
    Code:
      #HIGHTHRESHHOLD#d0.05
      #LOWTHRESHHOLD#d-0.05
    Is this what tells what each increment is?
    And I have no idea what

    Code:
      #HIGHKEYSEQUENCE#DOWN
      #LOWKEYSEQUENCE#UP
    is for...
    This has nothing to do with the display. The thresholds are the values at which their events fire off at. And the "d" before is short for "delta" or "change of". So presently "d0.05" means "every time the input voltage changes by 0.5 volts, do...".

    And the high threshold means "every time the input voltage increases by..." and the low threshold means "every time the input voltage decreases by...". They do not have to be the same but for most cases they will be.

    And the "events" I just mentioned is part of the second part of code. As of right now the only events are "switch an output on or off", "switch multiple outputs on or off", or [XOR] "send a key to a program". So with the keysequence that is just the key to send. "UP" is the up arrow and "DOWN" is the down arrow.

    Quote Originally Posted by h3rk View Post
    Nick did an excellent job describing the first part of the properties for analog inputs (and the others) I just need a little help with the rest now, I'm experimenting on my own, but a little direction may save a lot of trial and error.


    I'm using analog in as a home for what will be analog out to a driver for my fan in the AC circuit,for skin testing purposes. It would be nice if a lot of the same stuff from analog in carried over, so we can see what we're telling something to do without requiring seperate input feedback (that's usually reserved for critical processes in my experience).


    EDIT: I was briefly able to get past the errors enough to see the meat of the analog input editor, that stuff helps a lot, sorry I wasn't able to see that before, the only successes I'm having are trial and error based, using a barebones skin in the editor to see how it's supposed to work, and then using notepad, FCC and debug to implement what I want. It's slow going, but at least I found a way to get some of the reference material I needed.
    Let me know how it works out for you.
    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

Similar Threads

  1. Velleman K8055 USB I/O Board Extension plugin
    By 307SW_NLD in forum RR Released Plugins
    Replies: 224
    Last Post: 02-24-2013, 06:59 AM
  2. Replies: 68
    Last Post: 04-23-2009, 12:38 PM
  3. Virtual Earth cache builder? Or even gps simulator to make it cache?
    By thepunkerguy in forum DigitalMods (Scripts / API)
    Replies: 183
    Last Post: 08-28-2008, 08:58 PM
  4. Working on a new skin, easy to read, easy to use
    By monkeyracer in forum RR Skins
    Replies: 29
    Last Post: 01-12-2008, 04:34 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
  •