Show Posts
Pages: 1 2 [3] 4 5 ... 9
31  Using Arduino / Programming Questions / Re: An error... on: August 11, 2012, 08:46:11 am
Newbies make a lot of mysterious little coding errors. Perhaps you inadvertently deleted a brace?

Moving on, your code is pretty clear. The sketch should output "Starting Vehicle", before it goes to CRANKING state.

I'd get rid of the extra "//" that it probably does not matter:
 case CRANKING: //

Add lots of print statements to HandleStartingState():
void HandleStartingState()
[color=red]Serial.println("In Starting Vehicle"); [/color]
if(millis()-StartingTime > FUEL_PUMP_PRIME_TIME)
[color=red]  Serial.println("Starting Vehicle, pump primed"); [/color]
    Serial.println("Abort cranking");  
    Serial.println("Starting Vehicle");  

Try to pinpoint what is not right. Like once you establish that HandleStartingState() is called, you may want to stop printing "In Starting Vehicle" as it will be called repeatedly. Then you might check the alternator pin is correct, verify the alternator pin is setup right in code, verify it is correctly wired and put a volt meter on it to see if ever does go high.

So just pinpoint what is not as expected by printing diagnostics and checking hardware.
32  Using Arduino / Motors, Mechanics, and Power / Re: JST to Breadboard Connector on: August 11, 2012, 08:06:14 am
I would assume this is a common part, but I don't see the connector on SparkFun. It would be a male JST to jumper wire or maybe a JST socket. The JST connectors all look female.
33  Using Arduino / Motors, Mechanics, and Power / Re: JST to Protoboard Connector on: August 11, 2012, 08:02:44 am
I should have said breadboard. It is just a common breadboard, this style but bigger:
34  Using Arduino / Motors, Mechanics, and Power / JST to Protoboard Connector on: August 10, 2012, 11:06:50 pm
How is a lipo battery with a JST connector connected to a protoboard? Is there a adapter for this? Can I just jam a red and black wire in the JST connector?
35  Using Arduino / Networking, Protocols, and Devices / Re: Is WiFi easier than BlueTooth on: July 31, 2012, 06:01:13 pm
Ok, Bluetooth works fairly well. The annoying thing about it is that if you start your Arduino Bluetooth, but don't connect within like 5 minutes, it seems to turnoff. With Wifi, you start your server and just leave it up. You have to start the server first, but it prety much just works or you get a clear error (like port already in use). So I guess Bluetooth is okay.
36  Using Arduino / Networking, Protocols, and Devices / Re: WIFI boards with processors, and WIFI shields - recommendations. on: July 29, 2012, 02:39:56 pm
I have to agree with Paul, it is all about the support. It sucks to spend your $$ and your time and not get the thing to work.
Sparkfun's website allows user comments on the product page. There are many comments for this product, for which I'd rate their support a B.

Do any of the other sites listed provide any support? Do they sell lots of boards? And why is wifi not so popular?   
37  Using Arduino / Networking, Protocols, and Devices / Re: Is WiFi easier than BlueTooth on: July 29, 2012, 02:19:35 pm
Reinstalling the FTDI drivers fixed the download issue. Must have lost the drivers when upgrading the Mac OS. Thanks John.

I have an Objecive-c iPhone app that connects to a Python server socket app. It works smoothly; there is minimal fussing around. I'll try the Bluetooth again as it is already wired up and see how it goes.
38  Using Arduino / Networking, Protocols, and Devices / Re: Is WiFi easier than BlueTooth on: July 27, 2012, 10:21:54 pm
No, I would like to upload a sketch over USB with FTDI cable. But the Arduino IDE does not list any ports but the Bluetooth ports. Removing the Bluetooth board from the breadboard and disabling Bluetooth on the Mac does not help. I'm using Arduino alpha 0021. Probably should upgrade that, but likely a driver issue. I didn't know you could upload sketches over Bluetooth.

But main question is: Is wifi easier?

39  Using Arduino / Networking, Protocols, and Devices / Is WiFi easier than BlueTooth on: July 27, 2012, 04:22:16 pm
I have BlueTooth working on my Mac, but it is annoying. Right now sketches don't download because only bluetooth serial ports show in the Arudino IDE. (Which is another question.) There was driver installation and Bluetooth connections don't always start automatically.

Is WiFi or something else easier?
40  Topics / Robotics / TSOP34156 Beacon on: April 14, 2011, 09:32:45 pm
I am trying to use an LED as a beacon to a TSOP34156. The receiver successfully reads 12 bit Sony messages using Ken Shirriff's IR library.

The trouble is it is rather slow, at about 30 messages/second. It does not work reliably without the 10 ms delays (see the code below.) Besides speeding it up, the next step would be to add multiple receivers to see which direction is strongest. Ken Shirriff's IR library supports multiple receivers, so this is easy to try. And will also try multiple beacons.

How can this be speeded up? What message format should be used? Any advice on this approach?

Here is the sender's sketch:
#include <IRremote.h>

IRsend irsend;

void setup()

#define WAIT 10

void loop() {
      irsend.sendSony(0xa90, 12);
      irsend.sendSony(0xa91, 12);
      irsend.sendSony(0xa92, 12);
      irsend.sendSony(0xa93, 12);
      irsend.sendSony(0xa94, 12);
      irsend.sendSony(0xa95, 12);

Here is the receiver's sketch:
#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
  irrecv.enableIRIn(); // Start the receiver

int i = 0;

void loop() {
  if (irrecv.decode(&results)) {

    if(i % 120 == 0) {
      Serial.print(" ");
      Serial.println((long)results.value, HEX);
    irrecv.resume(); // Receive the next value
41  Using Arduino / Microcontrollers / Re: Can Only Upload Once on: March 31, 2011, 09:23:38 pm
It was the auto reset issue!

I'm not sure why the first sketch uploads without holding the reset button, but burn and repeated upload worked with 2 atmega328p chips.

Also had to move freshly burned chip to another breadboard (instead of uploading on same board as Arduino ISP), but this is a good idea anyway.
42  Using Arduino / Microcontrollers / Can Only Upload Once on: March 30, 2011, 09:32:14 pm
Steps to reproduce:
Burn a ATMEGA328P-PU with an ArduinoISP - No errors
Download blink sketch - No errors and it blinks
Download blink sketch a second time - Fails with following error:
  avrdude: stk500_recv(): programmer is not responding
  avrdude: stk500_recv(): programmer is not responding

Burning and downloads from Arduino Development Environment on a Mac. Arduino is breadboard variety like

If the atmega is burned again, a sketch can be downloaded once.

Any ideas for diagnosing this? Is there anything funky about ArduinoISP burning?
43  Using Arduino / Networking, Protocols, and Devices / Re: Can More than 2 Wireless Transceivers Talk? on: February 15, 2011, 08:10:02 pm
Has anyone tried this? Anyone have code or links to projects?
44  Using Arduino / Networking, Protocols, and Devices / Can More than 2 Wireless Transceivers Talk? on: February 15, 2011, 02:52:03 pm

Can any of the cheaper tranceivers on Spark Fun (like be setup with multiple senders and receivers?

The idea is that 3+ devices can communicate. They would take turns transmitting, maybe just transmitting short messages at random times, ignoring occasional contention. All transcievers would receive all messages.
45  Forum 2005-2010 (read only) / Troubleshooting / Re: Simple Stopwatch on: October 09, 2010, 10:12:16 pm
I think what you have done is fine.

It sounds like when lcd.print converts the integer 'seconds' to a string, it does not display the initial zero you would like, i.e. it displays "9" instead of "09".

This is just a guess, but to get the extra zero try:

if (seconds < 10)

Just play around with it until the lcd displays what you want.

Pages: 1 2 [3] 4 5 ... 9