Show Posts
Pages: 1 ... 327 328 [329] 330 331 ... 745
4921  Using Arduino / Project Guidance / Re: Using MIDI with Arduino, will only send when USB plugged in on: May 15, 2013, 07:38:32 am
If you'd posted your code and/or a wiring diagram we wouldn't need to guess what was happening. It should not need much code to demonstrate the behaviour you describe.

My guess is that you are using the hardware serial port used for the USB serial output for the MIDI output. You can't share serial ports like that - if you are using two serial connections you need two serial ports. If you only have one hardware serial port then you could use a software serial port for the second one.
4922  Using Arduino / Project Guidance / Re: Arduino powered occupancy sensor on: May 15, 2013, 07:26:13 am
If the LDR is there so that the Arduino can know when to switch lamps on and off then presumably it already knows when the lamp is on and could apply the appropriate criteria to the LDR reading. In that case you just need to find out how much difference the lamp makes to the LDR reading and adjust the code to accommodate that.
4923  Using Arduino / Programming Questions / Re: A 60 second timer on: May 14, 2013, 08:13:53 pm
If it is defined low, why is it reading a high sometimes??

It's not "defined low". Despite the name, sensorOutput is defined as an INPUT. All the digitalWrite(sensorOutput, LOW); does is turn off the pull-up resistor.

Unless you have connected something to pin 3 the input state will be floating and digitalRead() will return arbitrary values.
4924  Using Arduino / Programming Questions / Re: Problem with Arduino auto-generated function declarations on: May 14, 2013, 08:09:43 pm
I believe it's an attempt to give C++ some of the characteristics of Java - although the motivation for that baffles me. The result is not better or simpler than C++ in any significant way - it's just different, and moderately broken.
4925  Using Arduino / Project Guidance / Re: Tachometer Shift Light and gear position indicator on: May 14, 2013, 08:06:16 pm
Fair enough. With that proviso, what you're trying to do seems feasible and not particularly difficult.
4926  Using Arduino / Project Guidance / Re: sampling audio, web streaming and receiving (guidance help request) on: May 14, 2013, 08:05:15 pm
connect to the computer in the studio via web

This part is still unclear. Are you using a GSM shield? 3G? WiFi? Ethernet cable? Other?

Depending what type of communication you plan to make available, there may be alternative solutions available which don't require you to develop your own DIY solution and then leave expensive prototype hardware in a field.
4927  Using Arduino / Project Guidance / Re: controlling via RC receiver on: May 14, 2013, 08:02:16 pm
Grab some code to decode the received PWM pulse to provide the proportional control value. I don't know of a library that does that, but perhaps there is one. I've seen people doing it using interrupt based and polling approaches and if you Google 'Arduino servo receiver' there are tons of hits showing how to do it.

Apply whatever criteria you want to the received signal to decide whether the blinking function should be 'on' or 'off'.

Modify the blink code to only blink when the blinking function is 'on'. You aren't literally 'turning on and off a program' - you are just enabling / disabling features within that program.
4928  Using Arduino / Programming Questions / Re: Cornering fog lights / turning assistant. on: May 14, 2013, 06:10:01 pm
After changing RISING to INPUT - both lamps are on permanently..

I can't think of any place where it would be correct to use RISING where it would also be correct to use INPUT.
4929  Using Arduino / Programming Questions / Re: Get time zone with GPS? on: May 14, 2013, 06:06:39 pm
Quote from: el_supremo on Today at 02:31:00
The GPS satellites always report the time in UTC/GMT - they don't know where you are.

Well, strictly speaking they know where you are
Well, strictly speaking, they (the satellites) have not the slightest notion of where you are.

True, but the GPS receiver, which is the only part you interact with, does know where you are and this makes it possible to guess the appropriate timezone offset.
4930  Using Arduino / Programming Questions / Re: Problem with Arduino auto-generated function declarations on: May 14, 2013, 06:02:42 pm
The automatic prototype generation is a convenience sufficiently valuable to beginners that it is unlikely to be removed.

Evidently somebody thinks so, or we wouldn't have been lumbered with it. Personally, I think it's a mistake. Done well, it would have been a bad idea because it means that C++ coding experience doesn't transfer to Arduino and vice versa. However, it wasn't done well. I'm looking forward to the day that the Arduino IDE provides an option to turn this nonsense off.
4931  Using Arduino / Project Guidance / Re: Autonomous Robot, problem with rc and gps on: May 14, 2013, 05:12:17 pm
This sounds like a complex system and you could have problems in either the hardware and/or software design.

I suggest you divide the project down into simple parts and make sure each part is bullet proof before you add in the next part.

If I were you I'd start with a simple hard-coded sequence of motor movements and confirm that the motor power supplies, wiring and software are working correctly and reliably in your final vehicle configuration.

Once you know the output part is working correctly, you can start thinking about how the speed ought to be controlled and what inputs you need to control that - and start implementing those inputs. Confirm they're working correctly and reliably before you actually use them to control the motors. I'd suggest you focus on manual control first, and add the autonomous controls later. By the way, you don't mention having a compass. Isn't that essential? I'd have thought a gyro for closed loop yaw control would also be very helpful.
4932  Using Arduino / Project Guidance / Re: Keyboard Leonardo Windows on: May 14, 2013, 05:05:23 pm
You might be able to achieve that by programming the Arduino to emulate a keyboard, and that's certainly possible, but there may be a simpler way to achieve what you're trying to achieve.

Which begs the question: What are you actually trying to achieve?

I guess you are trying to send keyboard input to some PC application, in which case it'd help if you described what type of application it is and what OS the PC is running. For example, on Windows there are various ways to send keyboard events to an application and none of them are difficult, if you are willing to consider a solution that involves software installed on the PC.
4933  Using Arduino / Project Guidance / Re: Tachometer Shift Light and gear position indicator on: May 14, 2013, 04:58:24 pm
While it's certainly possible to measure the engine RPM and read/estimate what gear is engaged, there are lots of potential hardware and firmware failures which could cause the measured values to come out wrong, or cause the output pulses to be missed or duplicated. Unless your transmission has some system to prevent it, this could easily cause it to change to an inappropriate gear. If the gear is too low, this could realistically destroy the engine and cause a crash.

If you already know that's not possible in your application, or you already know how to design safety-critical systems to prevent that sort of issue, then what you're describing seems technically feasible.
4934  Using Arduino / Project Guidance / Re: Modifying servo speed w/ pot?? on: May 14, 2013, 04:50:05 pm
Is this possible?


When you say "360 degree servo" I assume you mean a continuous rotation servo i.e. variable speed motor/gearbox assembly. (There are conventional positional servos that provide travel of 360 degrees or more - obviously, if this is what you have then the behaviour will be quite different.)

With a continuous rotation servo you have direct control over the speed, and it would be easy to have this determined by a potentiometer input. If you need to be able to bring the servo to a complete stop, you might need to implement a 'dead band' so that you have to move the pot a small distance away from the nominal 'stop' position before the servo starts moving - otherwise, it might be very difficult to find the right position to stop it.
4935  Using Arduino / Project Guidance / Re: serial data logging project - first timer needs help on: May 14, 2013, 09:15:09 am
I need to log serial data from an external device.

I don't have links to hand, but take a look at Sparkfun's Openlog data logger, and also at Hobbytronics Ardulog.
Pages: 1 ... 327 328 [329] 330 331 ... 745