Giter Club home page Giter Club logo

figproxy's Introduction

What Is Figproxy?

  • Figproxy is a tool that enables rapid prototyping of tangible user experiences allowing Figma prototypes to talk to the external world.
  • More specifically, it's a utility that allows bidirectional communication between Figma and physical hardware for prototyping interactions that involve screens and physical elements like motors, lights, sensors etc.
  • It's designed to talk to hardware prototyping platforms like Arduino.
  • It's a nod to serproxy by Stefano Busti & David Mellis

Why Did You Make It?

At IDEO I work on a lot of physical product designs that incorporate displays. I commonly work with UX designers whose tool of choice for rapid iteration of experiences is Figma. This allows me to connect their designs to hardware I work on in the initial design phase, and can enable tangible experiences without having to develop software that duplicates the on-screen interactions.

What Does it Run On? (MacOS)

  • Currently, and for the forseeable future, this is a MacOS app only. It would have to be developed from the ground up for Linux or Windows and I don't have time to do it.
  • An iOS app is interesting but I'm not sure if it's possible.
  • I am 100% behind someone else taking this idea and porting it to another platform.

Use Cases

  • Kiosks - Soda Machines, Jukeboxes, Movie Ticket Printers, ATMs
  • Vehicle UI - Control lights, radio, seats etc.
  • Museum Exhibits - Make a button or action that changes what is on the screen
  • Home Automation - Prototype a UI to trigger lights, locks, shades etc. And make it actually work
  • Hardware "Sketching" - Quickly test out functionality with a physical controller and digital twin before building a more complicated physical prototype
  • Games - Make a physical spinner or gameplay element that talks to a Figma game
  • A ton more - I'm excited to see what you do with it!

Installation

  • Download the Figproxy App from the github releases also found on the right of this page →

  • Open "Figproxy.pkg" and follow the prompts. This will install Figproxy in your Applications Folder

  • Find Figproxy in your Applications and open it.

  • You will get this prompt, hit OK Screen Shot 2024-04-16 at 11 35 21 PM

  • If the system asks you to choose a default browser, select "Figproxy" as your default.

  • After Figproxy is set as the system default, Select the browser that was currently your default browser when this window pops up (For example Google Chrome) Screen Shot 2024-04-16 at 11 36 50 PM

  • You will also need to give it Accessibility Access:

    Screen Shot 2024-04-16 at 11 35 29 PM
  • Click "Open System Preferences" and make sure Figproxy has a check next to it: Screen Shot 2024-04-16 at 11 36 05 PM

  • That's it!

How It Works

Figma does not support communication to other software in its API. Because we can't go the official route, Figproxy uses two different "hacks" to achieve communication.

Speaking Out (Figma → Arduino)

Note: I will be using "Arduino" as shorthand for any hardware that can speak over a serial connection as it is by far the most common platform for this usage

When you specify for Figma to go to a link, Figproxy looks at the link and if it starts with "send" (and not, for instance "http://") we know it is intended to be routed to hardware.

In Figma you can set up an interaction like this: (this sends the character "a")
send a Figma

In Arduino, you can listen for a character and perform some action like this:

  if (Serial.available() > 0) {  
    // get incoming byte:
    char incomingByte = Serial.read();
    //in Figma the "Turn LED On" button sends "a",  "Turn LED Off" sends "b"
    if(incomingByte=='a'){
      digitalWrite(LED_BUILTIN, HIGH);
    }else if(incomingByte=='b'){
      digitalWrite(LED_BUILTIN, LOW);
    }
  }

If there is more complex data you need to send you can send a string like "hello world!:
send hello world!

You can even send hexadecimal characters by preceding the string with "0x"
send hex data

Speaking In (Arduino → Figma)

In Arduino, you can send a character like this:

Serial.print('c');

To get data into Figma, Figproxy sends characters as keypress events.
keypress event example

Software Options & Debugging

  • Serial Port: This is the serial port the Arduino is connected to. It will usually look something like "usbmodem101" It will not populate in the list until it is plugged in or connected.
  • Baud Rate: The speed that it talks. This needs to match the speed specified in your Arduino code. As a default 19200 is a good choice.
  • Browser Setup: Use this to set your secondary default browser again.
  • Data Options: These are options in how the serial data is formatted. For Arduino, you should not need to change these.
  • Test Send and Receive: you can type in characters to send to Arduino here to test without Figma. You can also see what the Arduino sends to Figma in both UTF-8 (character) encoding and hexadecimal encoding.
  • Toggle Pin States: Arduino uses RTS (Ready to Send) by default, and DTR (Data Terminal Ready) is needed for sending multiple characters to Arduino. These are on by default.

Examples

If you want to try out examples yourself you can find example Arduino Sketches in this repo and the Figma files here

Figproxy Arduino Basic Test

Demonstrates sending and receiving data from Figma using the Figproxy utility.
1_basic
Figproxy Arduino Basic Test
Video Link

Figproxy Dotstar Example

This allows you to control the colors of an LED strip from Figma. It also shows off raw hex-value data sending.
2_dotstar
Figproxy Dotstar Example
Video Link

Figproxy Encoder Example

This pushes the limits of Arduino→Figma communication - where we make a digital twin of a knob that has 100 different positions and make a "locker combo simulator" to show how we can use Figproxy to make complex interactive dynamic prototypes.
3_encoder
Figproxy Encoder Example
Video Link

figproxy's People

Contributors

davidvondle avatar

Stargazers

Derrek Chow avatar  avatar  avatar  avatar Kei avatar Chang Lebeouf avatar Dawid Janiga avatar Rogier Barendregt avatar Pedro Casaubon avatar Robert Klieger avatar Tommaso Turchi avatar Mike Kelly avatar Víctor Meza Herrera avatar Kuro avatar Jason Scott avatar  avatar  avatar Juri Hahn avatar Kinanti Desyanandini avatar Darren Wood avatar Catalin Stroe avatar Aaron Smith avatar  avatar Antonio Molinari avatar Tony Perez avatar Paul Young avatar lqjoo avatar  avatar Lucas avatar Kieran Nolan avatar Yaxuan Liu avatar  avatar Darren avatar XCWU avatar zhangwenjun avatar  avatar  avatar 张华粮 avatar  avatar Marc G avatar Gaishi Kudo avatar  Frad LEE avatar Dead Flamingo avatar Ethan D avatar Yancy Min avatar mizt avatar st44100 avatar Sean Liu avatar Kevin Lee avatar Christopher avatar  avatar boney yeldho avatar Nour Malaeb avatar  avatar fllywaay avatar yanjixiong avatar Josh Santangelo avatar Luobin Wang avatar Tyler Henry avatar  avatar Ricky Bacon avatar Tyeth Gundry avatar Brent Rubell avatar now_its_dark avatar John Boiles avatar Nick Arner avatar Simonsays777 avatar mike3090 avatar  avatar Vladimir Petrov avatar  avatar  avatar Orhun ÜNAL avatar Mehmet avatar Megan McClure avatar  avatar Nishra avatar Dom avatar  avatar Noah Lynaugh avatar Jalal Mansour avatar mXz avatar jlnschfr avatar Shay Moradi avatar Abhishek Shankar avatar Jasper Tran O'Leary avatar GianY avatar Tim Pulver avatar Guido Schmidt avatar μT avatar Afnizar Nur Ghifari avatar Matt Argyle avatar Juan Boirazian avatar Reza Faiz Atta Rahman avatar Gavin Renwick avatar Louie Gavin avatar Olivier Brückner avatar Saurabh Datta avatar Anthony Corletti avatar Frederic Gmeiner avatar

Watchers

 avatar Jenna Fizel avatar Gavin Renwick avatar  avatar

figproxy's Issues

# Implement a socket.io server to connect blokdots to figma

Hello ideo,
it would be great to implement a socket server to communicate bidirectional – blokdots <-> figma.
Unfortunately I don't have a macOS developer account to help you. Perhaps Apple upgrades my education account in the next weeks?!

If you are not interested just close the issue.

Cheers from Germany, HfG Gmünd
Benni

btw: such a nice tool for our students :-)

# Communication between figma and figproxy

Hey there,
I am trying to connect a programmable LED strip with a Arduino Uno r3 board and figma .
Arduino-Code:
the start flags for three different routines are "a" "b" "c" and they are working fine I verified this first in the Arduino IDE console and after that as well in the figproxy "Test Send & Receive" console.
Both are working just fine.

Figma:
As in the examples, I placed the text "send a" "send b" "send c" (without " ") into the open Link field at figma. The interaction gets startet by mouse click.

If I'm in prototyping mode, pressing one of the buttons, there is a new tab opening up and I can also read in the command line that it says "send%20a". As I learned, %20 stands for the empty space between the letters of "send a".
I am guessing that this could cause the problem, but I rather know how to fix this, as well as I am clueless if this really is where my problem occured.

I would be very glad for some help. Thanks guys :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.