Show Posts
Pages: 1 [2] 3 4 ... 30
16  Using Arduino / Interfacing w/ Software on the Computer / Re: Linux serial comm with Uno rev3 problems. on: April 11, 2013, 12:22:52 pm
Hi, there are a couple of things I would consider:
- opening a serial communication causes the Uno to reset, so if your programs don't wait a few seconds after connecting, whatever they send is lost.
- it may not make much difference, but depending on how the command is sent (e.g., print vs println) you may receive a terminating cr-lf. Your code is not prepared to handle these characters ('\r' or '\n').
17  Using Arduino / Networking, Protocols, and Devices / Re: Cellular shield to google spreadsheet on: April 10, 2013, 03:15:46 pm
Hi spatula,

Do you know how to implement that? to negotiate with TLS with using cellular shield (SM5100B, from sparkfun)

Many thanks.

Hi hong89, no I don't know, I don't even know whether it's feasible.
18  Topics / Home Automation and Networked Objects / Re: Assign I/0 Stream to UART on: April 08, 2013, 10:39:22 pm
Hi, the line:

FILE uart_str=FDEV_SETUP_STREAM(uart_putch,uart_getch, _FDEV_SETUP_RW);   

standing by its own, doesn't make much sense (at least not to me), since it is not part of a function (you can see that immediately after the main() function is defined). Perhaps it's a macro that expands to a function definition, I don't know.

Anyway, the different behavior between Arduino IDE and AVR Studio is probably due to the fact that the Arduino IDE uses a preprocessor to insert lines of code (#include statements, the main() function) that are not present in Arduino sketches). The preprocessor is not as smart as the gcc compiler and (like myself) doesn't understand what that line is for, in that position, while the gcc compiler that is directly invoked by AVR Studio doesn't see a syntax error and proceeds.
19  Using Arduino / Programming Questions / Re: Having trouble with comparison statement on: April 08, 2013, 09:38:28 pm
This is the statement that doesn't seem to work. I'm trying to flash the light when the sensor is reading between 10cm and 25cm.
if (cm > safeZone && cm < safeZone1)

This works fine. It flashes at 10cm.
if (cm < safeZone && cm < safeZone1)

Hi, stripping the logic to the bare minimum you have:
 if (cm > safeZone && cm < safeZone1)
// blink at interval frequency
  if (cm < safeZone && cm < safeZone1)
// blink at interval1 frequency
    ledState = LOW;
    digitalWrite(led, ledState);

Note that the else block is executed whenever
(cm < safeZone && cm < safeZone1)
is false, thus including the case when
(cm > safeZone && cm < safeZone1)
is true.
20  Using Arduino / Installation & Troubleshooting / Re: Problem interfacing with Uno from kubuntu cli on: April 08, 2013, 09:24:37 pm
I use a fd to get around this (google bash fd for more information)

Wonderful  smiley.
21  Using Arduino / Networking, Protocols, and Devices / Re: HC-05 activity LED on: April 08, 2013, 08:41:03 pm
you probably checked this source already, but from your description it seems you are following the schematics for an HC-06 board.
See, compare figs. 5 and 7.

I was thinking of doing the same "silly mistake" of yours, for connecting standalone microcontrollers dedicated to reading and transmitting data from a single sensor. Is it really such a bad choice?
22  Using Arduino / Installation & Troubleshooting / Re: Leonardo No Serial Output on: April 08, 2013, 08:11:33 pm
Perhaps you already did, but check the HP support page for Usb troubleshooting:

I would go back to my previous suggestion to burn a linux OS on a DVD or pen drive (if the PC can boot from a Usb pen drive). is relatively lightweight and should work with acceptable performance.
23  Using Arduino / Installation & Troubleshooting / Re: Problem interfacing with Uno from kubuntu cli on: April 08, 2013, 07:35:47 pm
Hi, when I tried some of these options myself I was quite disappointed, gave up and followed the hardware approach: a 10uF capacitor between RESET and GND works for me (the only downside is that you need to put it in place before connecting the Arduino). 
24  Using Arduino / Installation & Troubleshooting / Re: Leonardo detected and 5 secs later not detected on: April 08, 2013, 09:13:43 am
If i understood well you said that I need to burn something (e.g. blink) while the leonard is known (the 5 seconds)...
I tryied to click the burn button right after connecting usb cable but the 5 secs are not enough to write the image in the leonard and the burn process is aborted


Yes, it's tricky. First, the IDE must "remember" the last com port used. Hopefully the com port is seen by the IDE when the Usb with Leo is connected, and kept even when the Leo changes its nature. So, without removing the Usb anymore, you might try at first to upload blink, just so. If this doesn't work (and, honestly, I think it won't), you should start using the reset button on the Leo in conjunction with the upload button in the IDE. Press reset, wait one second, press upload. Try again, wait a little more (or a little less), press upload...
25  Using Arduino / Networking, Protocols, and Devices / Re: Problem reading serial data (Arduino to Arduino) on: April 08, 2013, 09:00:13 am
Or use a different protocol: I2C is particularly good for sending small amounts of data fast and reliably. It is based on a request/response paradigm so you don't have to implement any handshaking function yourself.
26  Using Arduino / Installation & Troubleshooting / Re: Leonardo detected and 5 secs later not detected on: April 08, 2013, 07:42:28 am
can you upload a "normal" sketch (say, Blink)? I don't know Jeelib, but it is possible that it relies on pin assignments that are not good for the Leonardo.

What happens to you is, partially, expected: when the Leonardo starts it shows as a normal communications device. For about 5 seconds it runs the bootloader and waits for incoming uploads. Then it disconnects and redefines itself as more than one device (a comm device plus mouse plus keyboard). The comm-only device seen by Windows on initial startup is no more valid. Normally it is replaced by a new set of devices, but here Jeelib may be causing troubles. If you can upload a sketch you are at least confident that you have at least restored the Leonardo to its normal state, then you can examine Jeelib and look for potential sources of incompatibility.
27  Using Arduino / Networking, Protocols, and Devices / Re: Seeed Bluetooth Shield Usage on: April 08, 2013, 07:21:43 am
I have experience with a different device but I believe they work the same:
- green/red alternating indicates that the device is inquirable.
- green blinking twice a second indicates idle state.
- green blinking once every two seconds indicates connected state.

The initial pairing requires the device to be inquirable, which as far as I know can only be set through a command from the Arduino (not a pin going high or low). So you need to load a sketch that does that (and then performs the pairing).

After a successful pairing, however, the device will remember the address of the master. When restarted, unless the Arduino is running a sketch that sends INQ or CONN commands once more, it will stay idle and not reconnect. Actually, this behavior depends on two further commands: one instructs the device to reconnect to the last master on startup, the other to permit the last master to reconnect, so the master (let's say a PC) can initiate the pairing from its side.

The device's behavior thus very much depends on which sketch the Arduino is running and on the parameters set by the last sketch.
28  Using Arduino / Networking, Protocols, and Devices / Re: Cellular shield to google spreadsheet on: April 08, 2013, 06:50:48 am
Hi, as far as I know the suite can only be accessed through https, which means that you first have to negotiate TLS, then send the body of the POST request in encrypted form.
29  Using Arduino / Installation & Troubleshooting / Re: 3 days did not find a solution, please help me thank you on: April 08, 2013, 06:25:26 am
Errors like # C 0x00000040 usually are related to low-level issues such as bad drivers or hardware errors. If you have external devices connected to the PC (including the Arduino) disconnect them before retrying. I don't expect the IDE will start, but it's worth making the attempt.

Then I would go to the device manager and look for devices having problems, red or yellow icons, and update their drivers or uninstall them. I would not exclude that the root cause of the error is a damaged RAM, or obsoleted drivers for your monitor. This may happen especially if Windows 7 was installed as an upgrade over a previous Windows version.

I would also look at the system error log, which may show "hidden" errors that do not appear on screen, and use the directx diagnostic tool (dxdiag) for diagnosing problems with the display. If you can program in Java you may try building and running a simple application, otherwise you may download an already compiled one such as I don't expect it will run, but that would confirm that it is a system issue and not an Arduino one.
30  Using Arduino / Interfacing w/ Software on the Computer / Re: Eclipse built Blink not starting on: April 08, 2013, 05:18:33 am
Can you show the options used during compilation and linking (those for avr-g++)? Given the nature of the sketch, the F_CPU parameter is particularly important. I understand that the package comes with its own copy of the arduino sources, including Arduino.h (not the arduino.h in the sample project) and wiring.c (the latter is where the function delay() is defined). Are these files identical to the ones in the Arduino distribution?
Pages: 1 [2] 3 4 ... 30