We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi
I ask for your help in the 3D sensor data view in Processing "3D Column"
If you know a sample to share, help a lot!
see attached arduino sample code:
#include <CapacitiveSensor.h>
CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2);
CapacitiveSensor cs_4_5 = CapacitiveSensor(4,5);
CapacitiveSensor cs_4_8 = CapacitiveSensor(4,8);
void setup()
{
cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF);
Serial.begin(9600);
}
void loop()
{
long start = millis();
long total1 = cs_4_2.capacitiveSensor(30);
long total2 = cs_4_5.capacitiveSensor(30);
long total3 = cs_4_8.capacitiveSensor(30);
Serial.print(millis() - start);
Serial.print("\t");
Serial.print(total1);
Serial.print("\t");
Serial.print(total2);
Serial.print("\t");
Serial.println(total3);
delay(10);
}
Thanks
Answers
are we sure that this is processing / JAVA?
Looks more like C / C++ / C#
when posting code:
in the IDE:
click crtl-t
good indents
in the browser:
paste it
leave 2 empty lines before it
mark / select entire code
then click C in the command bar
then Save
Greetings Chrisir
please look here
http://forum.processing.org/two/discussion/comment/11741#Comment_11741
it's 2D but you can make it easily 3D
like this...
@Chrisir, he's mentioned that was Arduino code. Arduino uses C instead of Java! And its draw() is called loop() too!
{ PROCESSING SKETCH