Reference

This is a list of all the methods available on the tramontana object in Processing.

Actuators

Haptics
makeVibrate()

Media
showImage(String url)
playAudio(String url)
playVideo(String url)
loopVideo(String url)

Flash light
setFlashLight(float onValue)
pulseFlashLight(int numberOfPulses, float duration, float intensity)

Screen
setBrightness(float brightness)
setColor(float red, float green, float blue, float intensity)
setColor(int red, int green, int blue, int intensity)
transitionColors(float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2, float duration)

Subscribe - Sensors

subscribeAttitude()
subscribeAttitude(int frequency)
subscribeAudioJack()
subscribeDistance()
subscribeMagnetometer()
subscribeOrientation()
subscribePowerSource()
subscribeTouch()
subscribeTouch(Boolean multitouch)
subscribeTouchDrag()
subscribeTouchDrag(Boolean multitouch)

Callback methods

onVideoEndEvent(String ipAddress)
onAttitudeEvent(String ipAddress, float yaw, float pitch, float roll)
onAudioJackEvent(String ipAddress, int isIn)
onMagnetometerEvent(String ipAddress, int isAboveThreshold, float magnetometerValue)
onDistanceEvent(String ipAddress, int distanceValue)
onOrientationEvent(String ipAddress, int orientation)
onPowerSourceEvent(String ipAddress, int orientation)
onTouchEvent(String ipAddress, int x,int y)
onTouchDragEvent(String ipAddress, int x,int y)
onTouchDownEvent(String ipAddress, int x,int y)
onMultiTouchEvent(String ipAddress, ArrayList touches, int numTouches)
onMultiTouchDragEvent(String ipAddress, ArrayList touches, int numTouches)
onMultiTouchDownEvent(String ipAddress, ArrayList touches, int numTouches)
gotBatteryUpdate(String ipAddress, float batteryValue)

Camera

takePicture()
takePicture(int camera)
takePictureWithUI(int camera)

Embedded Actuators

setServoEmbedded(int servoIndex, int value)
setRelayEmbeddedOff(int relayIndex)
setRelayEmbeddedOn(int relayIndex)
sendSerialMessageEmbedded(String msg)
setColorEmbedded(int ledIndex,int red, int green, int blue)
blinkColorEmbedded(int ledIndex,int red, int green, int blue)
setAllColorEmbedded(int red, int green, int blue)

Embedded Sensors

subscribeRxEmbedded()
releaseRxEmbedded()
subscribeButtonsEventEmbedded()
releaseButtonsEventEmbedded()
subscribeAnalogEmbedded()
releaseAnalogEmbedded()
subscribeLDREmbedded()
releaseLDREmbedded()

Embedded Callbacks

onEmbeddedBtnsEvent(String ip, int btnIndex, int btnValue)
onEmbeddedRxEvent(String ip,String msg)
onEmbeddedAnalogUpdate(String ip, int value)
onEmbeddedLDRUpdate(String ip, int value)

Utilities

version()
getBatteryLevel()

OSC - Machine Learning

sendAttitudeDataToOSC(float frequency, int port)
sendAttitudeDataToOSC(float frequency, int port, String ip)
sendTouchDataToOSC(int maxNumFingers)
sendTouchDataToOSC(int maxNumFingers, int port)
sendTouchDataToOSC(int maxNumFingers, int port, String ip)
stopAttitudeDataToOSC()
stopTouchDataToOSC()