Loading...
  Show Posts
Pages: 1 2 [3] 4 5 ... 9
31  Using Arduino / Programming Questions / Re: arduino/processing serial communication being slow on: November 12, 2011, 06:56:23 pm
@Nick Gammon:

Sorry if I came off that way. It's just that initially when I made this post, nobody responded for a while, so I started worrying. I'll use better etiquette in the future.

I responded to your question—it's just the graphics that move slowly. The numbers themselves print fine.
These numbers are the values I'm getting from each sensor.

32  Using Arduino / Programming Questions / Re: arduino/processing serial communication being slow on: November 12, 2011, 06:52:24 pm
Quote
I worry when I read about a library that "waits for the receive pin to change to the same state". Now if you are doing that for lots of sensors, won't that be slow?

Why would it be slow?
Also, everything else seems to be working fine—the program also plays different types of music when each sensor is touched, and there's nothing slow about that. Also when I use the serial monitor to see what numbers are being outputted, they print quickly. It's just the graphics in Processing that are being slow.
Then again, the graphics in Processing seemed to move more quickly when I had both Processing and Arduino programs written only for one sensor, so…maybe it does have to do with the fact that I'm using multiple sensors.

Quote
Analog pin 0 is A0, not 0 - when using pinMode. You are setting D0 (digital pin 0) to input.
Thanks for the clarification.
33  Using Arduino / Programming Questions / Re: graphics in Processing moving slowly—please help! on: November 12, 2011, 06:06:32 pm
I just tried removing those delays, and they don't seem to have much of an effect on the program at all. The only reason I put them there was because the guy in the tutorial I was watching told me to.

I also removed pinMode(photocell, INPUT). It doesn't seem to have a significant effect on the program, either—but tell me, why is it a bad idea to do that?

Okay, in the future I'll try to do that before posting code.
34  Using Arduino / Programming Questions / graphics in Processing moving slowly—please help! on: November 12, 2011, 05:46:56 pm
Hi, I have my arduino connected to two sensors that are controlling the graphics in a Processing program. However, the graphics are SUPER slow. I have no idea what could be causing this problem. Please help!

The files are here: http://allotrope-dome.net/sketches/
35  Using Arduino / Programming Questions / Re: slow serial communication—really need help! on: November 12, 2011, 05:42:56 pm
I tried changing the baud rate BOTH in line 11 of my Processing code and in line 32 of my Arduino code to 19200, then 38400, and it didn't do anything to change the pace of the graphics—if anything, it only made them move more slowly.
36  Using Arduino / Programming Questions / Re: slow serial communication—really need help! on: November 12, 2011, 05:32:23 pm
I tried, and it doesn't really help. :/
37  Using Arduino / Programming Questions / Re: slow serial communication—really need help! on: November 09, 2011, 04:41:05 pm
I just changed it to 12000 and now Processing is giving me an error: "Error inside Serial.<init>()"
38  Using Arduino / Programming Questions / Re: slow serial communication—really need help! on: November 09, 2011, 04:37:00 pm
CrossRoads, I don't understand what you are suggesting.
AWOL, what do you think it could be?
39  Using Arduino / Programming Questions / slow serial communication—really need help! on: November 09, 2011, 04:31:22 pm
Hi, I have my arduino connected to two sensors that are controlling the graphics in a Processing program. However, the graphics are SUPER slow. I have no idea what could be causing this problem. Please help! My project is due in a couple of hours. I've attached my code to this message.
40  Using Arduino / Programming Questions / Re: arduino/processing serial communication being slow on: November 09, 2011, 02:05:59 pm
Also, here's the .h file for the pitches.
41  Using Arduino / Programming Questions / arduino/processing serial communication being slow on: November 09, 2011, 02:05:21 pm
I'm working on a project in which I have letters painted out in conductive ink. These letters act as a capacitive sensor, so whenever anybody touches them, pitches get played through a piezo transducer and Processing graphics are produced on my computer screen—the graphics and music change accordingly with the sensor values.

However, I have a problem. When I have these programs written for ONE sensor only, they work fine. When I have them written for TWO ink sensors, then the graphics in Processing are really, really, REALLY slow. Does anybody know why that is and how I can fix it? I'm going to be connecting six sensors to this thing, eventually.

I've attached the programs that I wrote for one sensor only (sketch1.pde and CapSound_singlesketchtest.pde) and the programs I wrote for two sensors (processingSerialCom4.pde and CapSound4.pde).
42  Using Arduino / Programming Questions / Re: sending multiple numbers simultaneously from arduino to processing on: October 31, 2011, 01:28:37 pm
Okay, sorry if I wasn't being clear.

I changed my idea around a little, and here's what I want to do.

Here's my setup: I have three capacitive sensors made with conductive ink (this is what I'm talking about: http://www.bareconductive.com/capacitance-sensor) connected to three respective speakers. When you move your hand over each sensor, each speaker emits different noises. So far, I've only set up the first speaker, though.

I want to make it so that there are essentially three different graphical sketches in the Processing program I wrote, and a different one is activated depending on which sensor you move your hand over. If you move your hand over two sensors at the same time, it'll keep playing the sketch that corresponds to the first sensor you waved your hand over, then once you move your hand away, it'll play the sketch corresponding to the other sensor.

Does that make sense? I think I've got the speaker part down, it's just the Processing part that I'm unsure of how to handle.

TLDR: how do I write a program that generates different Processing sketches depending on which sensor you hold your hand over?
43  Using Arduino / Programming Questions / sending multiple numbers simultaneously from arduino to processing on: October 30, 2011, 09:36:20 am
I have a capacitive sensor program written in Arduino, and I'm using the sensor values to generate different colors in Processing. How would I go about connecting multiple sensors and conveying the signals from both simultaneously into Processing?

I've uploaded my Arduino and Processing programs for you guys to look at.
44  Using Arduino / Motors, Mechanics, and Power / Re: motor bi-directionality issue on: October 28, 2011, 06:53:48 am
Can I just power the entire arduino using 9v?
45  Using Arduino / Motors, Mechanics, and Power / Re: motor bi-directionality issue on: October 28, 2011, 06:52:57 am
How would I do that if my whole H-bridge is connected to the Arduino? Could I use a 9v battery? How would I do that without messing up everything that's connected to the Arduino?
Pages: 1 2 [3] 4 5 ... 9