Program Arduino with P5JS 

You'll be able to download from this location an .ino Arduino file to load onto an Arduino board or a FunKey board.  Then you go to these urls to code it directly.

Using Chrome, go to the links below. An editor will launch with examples.  You can edit the examples, and load and save code files from your computer.

Here's an example that uses a sensor to change a value in Javascript.  Connect a potentiometer to port A0 (M) then click on this link.  The code will appear in an editor.  Click "run code" to run.  You can also upload or download javascript files you have made, stored on your computer.

Here's another example that uses a sensors and outputs with comments in the code.

Here's another example that uses a servo motor controlled by a potentiometer.  The servo is connected to port D0 (G) and the potentiometer is connected to port A0 (M)

Heartbeat recorder example:  The heartbeat sensor is connected to port A0(M)​.  Place the sensor on your skin, give it a while to stabilize and you should see dips in the graph when your heartbeat is detected.  Try different areas on your palm, fingertip or cheek.


Theremin: sensor on port A0 controls the frequency of sound

Make SURE you have potentiometers connected to A0 and A1

Potentiometers control the frequency of sound of two inputs

Control the light level of an LED  using "pwm" on port 3, 5, 6 or 13