Results 1 to 3 of 3

Thread: Assigning analog input to keyboard buttons?

  1. #1
    Newbie
    Join Date
    Jan 2006
    Posts
    44

    Assigning analog input to keyboard buttons?

    From what I've read so far, I can use the analog inputs of the FB to sense hardware pushbuttons - all I need to do is connect the pushbuttons to a 5V power source, and the analog input will sense the 5V when I push the button.

    I'm wondering how hard it is to configure each analog input to function as a keyboard button. i.e. analog input 1 senses +5V, and the software presses a virtual keyboard button that I assign. Is this easy to do without any programming knowledge with the current software? Also, is it possible to configure how fast the virtual keyboard button is "pressed" when I hold down my hardware pushbutton (sustained +5V to analog input on fusion brain). Thanks!

    SG

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Yup and yup.

    Have you downloaded the installer package with the configurator? If not I suggest you do.

    To make the button send a keystroke:
    a) make a brain instance
    b) make an analogue input instance
    c) start a new logic block
    d) make the logic layout as shown in the first picture
    e) click the "what to do" button (the judgment icon)
    f) add a new do statement and select "send key" for the what to do part

    To change the maximum times per second it fires, click the time icon on the logic block
    g) and then there you change the time for the minimum time between firing. So if you set it to 100, then it can only send the key 10 times a second. Change it to 1000 and then only 1 time per second. Change it to 60000 and it will only fire 1 time every minute. and so on.





    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

  3. #3
    Newbie
    Join Date
    Jan 2006
    Posts
    44
    Alright, I'm sold. I just ordered one. This thing is perfect - exactly what I've been looking for. I just hope it works with USB 1.1!!

    SG


    [QUOTE=2k1Toaster;1219562]Yup and yup.

    Have you downloaded the installer package with the configurator? If not I suggest you do.

    To make the button send a keystroke:
    a) make a brain instance
    b) make an analogue input instance
    c) start a new logic block
    d) make the logic layout as shown in the first picture
    e) click the "what to do" button (the judgment icon)
    f) add a new do statement and select "send key" for the what to do part

    To change the maximum times per second it fires, click the time icon on the logic block
    g) and then there you change the time for the minimum time between firing. So if you set it to 100, then it can only send the key 10 times a second. Change it to 1000 and then only 1 time per second. Change it to 60000 and it will only fire 1 time every minute. and so on.

Similar Threads

  1. Renault "Tuner List" Head Unit/CD changer hacking - Controls
    By Vicne in forum Hardware Development
    Replies: 800
    Last Post: 10-30-2012, 07:09 PM
  2. Laptop keyboard to the PS2 port....
    By claylong in forum General Hardware Discussion
    Replies: 8
    Last Post: 09-22-2007, 06:29 AM
  3. serial input buttons
    By Ralphh85 in forum Hardware Development
    Replies: 4
    Last Post: 03-12-2007, 01:47 AM
  4. Analog Input, is there an easy(cheap) way?
    By Fusion-One in forum Hardware Development
    Replies: 27
    Last Post: 03-31-2006, 05:36 AM
  5. keyboard buttons with gamepad
    By embedded in forum Software & Software Development
    Replies: 1
    Last Post: 03-26-2003, 06:21 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
  •