hello, I am trying to send key combinations through my processing program to send out commands to AutoHotkey, such as Control+Shift+Left, Control+Shift+Right.
But the problem is that basically nothing happens with no error: Here is the code below:
And another problem is that I am trying to send simply the ENTER key but every time I do, it pops up with an OSC error for some odd reason (I am also using the OSC library)
Hi I would like to use a nice WMI library built for Java but I'm not sure how to add it to my processing sketch, I've tried just dragging and dropping the jWMI.java file into processing and that didn't work. In case you haven't heard of this package, here is a link to the webpage:
http://henryranch.net/software/jwmi-query-windows-wmi-from-java/
I would really appreciate help as I have been stuck on this for a long time. Also I will need really detailed help as I am a complete noob to anything java basically.
To monitor system temps I am using the OpenHardwareMonitor freeware that publishes information to the WMI. My question is this, how can I access this within Processing? Is there a library or will I have to use pure native java stuff?
Hi, sorry for the vague title but I wasnt sure how to come up with a clever title.
Basically the scenario is this: I have an arduino that constantly is listening for UDP commands for things such as analogreads,digitalwrites,etc. i am trying to come up with a very inclusive controlp5 interface that can sends these udp commands out to the arduino for all my controlp5 interfaces such as toggles/buttons/sliders. but the kicker here is that I only want the command to be sent only when the control event is called, not done in the main draw loop because then the ardiuno would get overloaded with commands. im sorry if this is too vague, but any help is appreciated, i have spent countless hours trying to do this
So I'm trying to send data to touch osc running on my iphone from processing with the OSCP5 Library. basically i want toggle switches and faders to stay in sync with processing says the values are. But Im having difficulties retrieving the data on the phone, or more specifically, the iphone updating. i've confirmed that with my sketch posted below, that the osc comes in correctly formatted (with the PureData basic.pd sketch provided on the website) I also get the little red light on the touchOSC (near the page slider to stand for the fact that data has been received) however the toggle swithces do not change state on the app. Does anybody have a reason as to why this is happening and how to fix it? I hope it is something simple!
Thanks!!
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress Remote;
int portOutgoing = 9000;
String remoteIP = "192.168.1.131";
void setup()
{
oscP5 = new OscP5(this,8000);
Remote = new NetAddress(remoteIP,portOutgoing);
}
void draw()
{
myDelay(3000);
String labelMessage = "";
// send message to the iPad to update labels
OscMessage myMessage = new OscMessage("/1/toggle1 1");
Hello, is it possible to access computer system hardware information like cpu temp,gpu temp,etc..?
i would like to be able to monitor this information and do things with the data, ie control fan speeds. i already have a pwm system set up with an arduino and all the communication worked out, I just need to know if its possible to get system info in processing, if not would there be another way around to get it and have processing access that?
On an unrelated note, for google searching, do you guys have any tips when it comes to topic searching for processing related things? i dont ever get good results like i do with similar arduino searches (the word processing is too ambiguous i suppose)
Hi, I am having a problem with creating strings in processing. Basically I have data coming in that is an integer and I would like to concatenate it with existing characters. And then send that string out in a UDP packet to an arduino. so overall i am having a simple data conversion problem with conversion between strings, and string arrays. I'm pretty sure i dont want it to be a string array because it wont send correctly. I have posted the code i have so far below:
import oscP5.*; // Load OSC P5 library
import netP5.*; // Load net P5 library
import processing.serial.*; // Load serial library
import hypermedia.net.*;
UDP udp; // define the UDP object
String ip = "192.168.1.177"; // the remote IP address
oscP5 = new OscP5(this,8000); // Start oscP5, listening for incoming messages at port 8000
udp = new UDP( this, 6000 ); // create a new datagram connection on port 6000
//udp.log( true ); // <-- printout the connection activity
udp.listen( true ); // and wait for incoming message
}
void oscEvent(OscMessage theOscMessage)
{
addr = theOscMessage.addrPattern();
if(addr.indexOf("/1/fader") !=-1)
{ // Filters out any toggle buttons
i = int((addr.charAt(8) )) - 49;
fader[i] = theOscMessage.get(0).floatValue();
x[i] = int(map(fader[i], 0, 1, 0, 255)); //a value from 0-255 #####This is the value I want to concatenate ########characters labeled above as 'handshake', ' command', and 'pin' number
if (toggle[j] == 1)
{
//udp.send("!A12000@", ip, port); //this is an example of what needs to be sent from this program with the value of "200" being the integer of x[i]
}
if (toggle[j] == 0)
{
//udp.send("A06255@", ip, port); //this is an example of what needs to be sent from this program with the value of "255" being the integer of x[i]
for a little project im working on i need to send data to an arduino via touchosc. i have written code for the arduino that reads data from the serial port in a specific protocol to control and read digital/analog pins, and it works quite well. However, i cant seem to get the processing side to work. the general data that should be written to the serial port is of the form "!1A13255@" where:
! = handshake
1 = arduino ID ( i plan to have multiple hooked up)
A = command for analogWrite
13 = pin number (00-13)
255 = value for analogWrite (000-255)
@ = terminator
so basically I want to read in the fader value from touchOSC and then concatenate that with dynamic values for the arduino ID, command (A,a,D,d), value, and terminator.
How do I go about doing that?
I have posted the code I have so far below. the value "x" prints just fine to the console with numbers 0-255.
import oscP5.*; // Load OSC P5 library
import netP5.*; // Load net P5 library
import processing.serial.*; // Load serial library
Serial arduinoPort; // Set arduinoPort as serial connection
OscP5 oscP5; // Set oscP5 as OSC connection
void setup() {
size(100,100); // Processing screen size
noStroke(); // We don’t want an outline or Stroke on our graphics
oscP5 = new OscP5(this,8000); // Start oscP5, listening for incoming messages at port 8000
//println(Serial.list());
arduinoPort = new Serial(this, Serial.list()[1], 9600); // Set arduino to 9600 baud
}
void oscEvent(OscMessage theOscMessage) { // This runs whenever there is a new OSC message
//read in OSC message and save the value of the "orange" fader to val
String addr = theOscMessage.addrPattern();
float val = theOscMessage.get(0).floatValue();
float orangeAmount;
if (addr.equals("/1/orange")){ orangeAmount = val;}
//convert that floating value of "val" to an integer from 0-255