Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Combining VirtualWire and Softserial on: January 30, 2011, 11:08:31 am
Haha. Point taken.
I switched to NewSoftSerial and rewrote everything from scratch. It seemed that I spent to much time recalculating checksums every turn in the loop.
Now it works. I simply watch the NewSoftSerial-port and when I get a stop-byte, I now recalculate the checksum and then send off the packet.
2  Using Arduino / Networking, Protocols, and Devices / Combining VirtualWire and Softserial on: January 30, 2011, 02:57:57 am
I've briefly tried to combine the use of
   1. Softserial (for getting data from GPS) at 9600 bps
   2. VirtualWire (for sending the data to a remote host) at 2000 bps
But it seems like I'm not getting anything on the Softserial-watching port as soon as I include the VirtualWire-library.
They are of course using different pins.

Is this a known interrupt-issue?
I have the debugging computer connected on the normal Serial line. (115000 bps, is this an issue?)
I am in urgent need of sending the data. Please advise a lady in despair  smiley-red.

(Hardware: boarduino w atmega328, GPS, simple 434MHz ASK-transmitter)
3  Forum 2005-2010 (read only) / Syntax & Programs / Interrupt and softserial on: April 08, 2008, 02:50:28 am
I'd like to do serial communication "sporadically" with two different external units. As I understand, the softserial library is blocking, right? So I guess using interrupts is a way to "circumvent" this.

I do have pins that go low when the external unit sends something, and  I know for a fact that these won't interrupt simultaneously. (I.e. 1 pin for the interrupt and one for reading serial data from the external part).

I am not sending anything to the external unit.

Can anyone point to a brief example of how to do this with two units? Is it possible to do with three?

4  Forum 2005-2010 (read only) / Syntax & Programs / Re: Even quicker pointer question on: February 06, 2008, 08:49:05 am
I'm not storing in the EEPROM, but thanks for answering anyway.

My pointers seem to work, and my millisecond time seem to be passed into the byte-array fine.
5  Forum 2005-2010 (read only) / Syntax & Programs / Even quicker pointer question on: February 05, 2008, 11:08:32 am
I have an unsigned long that I want to put into a byte-array.

unsigned long start_time = millis();

#define TIME_POS 14
byte storage[28];

Can I store and retrieve it like this:

// store
*(unsigned long *) &storage[TIME_POS] = start_time;

unsigned long last_start_time = *(unsigned long *) &storage[TIME_POS];


(I am fully aware of that the byte order may differ, but for the time being I will only use Atmega168 and Atmega8-based Arduinos for this.)
6  Forum 2005-2010 (read only) / Interfacing / Using a FTDI-cable with Arduino Mini on: June 17, 2009, 10:15:44 pm
1. I have a Mini 04 that is soldered into a project.

2. I have a FTDI-cable with cabling like 4.1 in  

3. Now I want to solder a 6-pin header so I can connect this cable.

QUESTION 1: Am I wrong in supposing that this cable works?

As I understand, I just have to connect
     a. GND (header pin for black cable) ==> GROUND on the Mini
     b. VCC (header pin for red cable) => 5V+ on the Mini

And then just TXD + RXD.


Do I connect the header pin for the orange cable (says TXD in FTDI datasheet) to the TX pin of the mini OR to the RX pin of the Mini?

No, I don't want to trial and error.


Can "all" other header pins (for cable CTS# and RTS#) just be left unconnected?


7  Forum 2005-2010 (read only) / Interfacing / Re: arduino and electromagnets on: March 28, 2008, 09:21:53 am
A pwm output to a mosfet transistor that drives the electromagnet coil, maybe?
8  Forum 2005-2010 (read only) / Interfacing / sensitive hall effect sensor on: February 07, 2008, 03:27:56 am
Can anyone give me a tip on a very sensitive hall effect sensor.
My requirements are "small, sensitive". And not sensitive in the way a reed switch is.

I'm about to detect small magnets through a glass window, and there is no rotation involved,
so it's merely there or not there, that counts.
9  Forum 2005-2010 (read only) / Exhibition / Re: Bitlash 1.0 (RC1) available at on: June 07, 2009, 11:18:38 pm
Thanks for quick reply. Yes. I understand. I am super greatful for bitlash as it is. I'll use it with a 328 for now and just dropping the libraries manually from the directory before compiling. No probs.

It actually feels a little like the interactivity I had with microcontrollers back in the '80:s when we had FORTH running in a similar environment. Back then the processor was a Mitsubishi 747 (a onechip ~6502 clone that had some eprom).
10  Forum 2005-2010 (read only) / Exhibition / Re: Bitlash 1.0 (RC1) available at on: June 07, 2009, 03:01:33 pm
Would it be possible to explicitly tell bitlash which libraries to include?
It seems like it is including the lot right now, which might be too much if still running on e.g. a 168.

Pages: [1]