Show Posts
Pages: [1] 2 3
1  Development / Other Hardware Development / Re: Wizfi Shield wizfi210 on: August 04, 2014, 07:51:00 pm
Which shield are you using? The WizFi 210 module has four ports to communicate with the MCU, and different shields might use different WizFi module port. SainSmart shield, for example, uses UART (serial) as Uno-WizFi link. This prevents Uno from communicating with your PC, because Uno-PC connection uses the same port. If this is the case with your shield, too, then program the Uno without the WiFi shield, then disconnect from PC, (unplug the power if you are powering the Uno from external power supply, too), connect the shield, and power Uno, but do not connect Uno to PC while the WiFi shield is attached.
2  Using Arduino / Programming Questions / Re: arduino uno and wifi headache on: August 04, 2014, 07:14:32 pm
Paul,

The WizFi 210 module he is using has two UARTs, I2C and SPI, and he seems to be using one of the UARTs
3  Using Arduino / Project Guidance / Re: WizFi 210 and PN532 NFC shield on: August 04, 2014, 07:08:45 pm
I have no experience with SPI and I2C in the same code, but WizFi 210 has UART, too. Maybe you could use it instead of SPI. I have a number of projects where I use both hardware UART, Software Serial, and I2C off a single Atmel chip, or off Arduino Mega 2560 or Pro Mini 328.
4  Using Arduino / Networking, Protocols, and Devices / Re: Arduino bluetooth module HC-06 drops connetion.. on: June 17, 2014, 03:40:30 am
Zaxarias,

We have been using HC06s foe a couple of years in various units, and we found them very reliable.

When the connection starts dropping, it is typically the battery (our Master units are connected to arduinos powered from the wall adapters, but the slaves are battery powered). Once the battery capacity is exhausted, bluetooths typically first give, requiring some 25 mA to keep the connection when paired, while the arduino pro mini keeps working (still getting it's 5 mA or so).
5  Using Arduino / Microcontrollers / Re: ATTiny87 core? on: June 17, 2014, 02:45:18 am
You could go for the ATTiny167, which is supported. It is basically the same as the 87, but with more flash.

The only thing that doesn't support the 167 directly is avrdude, though if you add the lines from the attached file into your avrdude.conf file, it will work fine.

Hey Tom, have 87 entry for avrdude.conf?
6  Using Arduino / Microcontrollers / Re: ATTiny87 core? on: June 10, 2014, 03:58:22 pm
If ATMega8, not sure if I can solder MLF/TQFP... The ATTiny87 comes in SOIC, which I can deal with.

Thanks for the pointer to TCWORLD/ATTinyCore. I already saw it but was not clear about a few items: Can I use it with Arduino IDE (what about toolchain?) or do I need to use UECIDE then?
7  Using Arduino / Microcontrollers / ATTiny87 core? on: June 10, 2014, 02:36:01 pm
Anyone knows of a ATTiny87 core that would work with the current IDE (I'm still running 1.0.5, until 1.5 rises out of beta phase)? 87 does not seem to be in the toolchain either.

I have a project with the code at a bit over 5k, and needing 16 digital I/O lines. Prototype, running on Pro Mini works and the project is about to get its own PCB... ATTiny87 looks just right...
8  Using Arduino / Networking, Protocols, and Devices / Re: Problems with AT commands to Bluetooth HC-06 on: June 08, 2014, 01:24:02 am
When using 3.3 V Bluetooth with 5 V Arduino (say, 5 V Pro Mini), generally, you should not connect Arduino's TX directly to Bluetooth's RX. This is what I do, and I have a number of prototypes working this way:

- Arduino GND to Bluetooth GND
- Arduino VCC, through two diodes 1N4148 in series - anode of the first diode to Arduino, cathode of the second diode to Bluetooth VCC
- Arduino's RX to Bluetooth's TX
- Arduino's TX, through 1k8 resistor, to Bluetooth's RX (this may become a problem at higher speeds, but runs fine for me at 38400 baud)

Leave Bluetooth's reset  not connected (The pin configuration figure does show the 10 k pulldown resistor, and partially a 220 n capacitor,but those components are built-in on the HC Bluetooth module.
9  Using Arduino / Networking, Protocols, and Devices / Re: How is this checksum calculated on: June 06, 2014, 02:00:18 am
It's a sport score and time display, which outputs display state as a serial stream for connecting remote (slave) displays.
10  Using Arduino / Networking, Protocols, and Devices / Re: No-library single-byte serial transmit? on: June 06, 2014, 01:35:36 am
That is now what I was asking for, but thank you for the comment and the idea!

In the meantime, I managed to use SoftwareSerial for all 3 connections, after realizing that the order in which you initialize SoftwareSerial objects matters (peeking into the TwoPortReceive example helped).
11  Using Arduino / Networking, Protocols, and Devices / Re: Problems with AT commands to Bluetooth HC-06 on: June 06, 2014, 01:19:41 am
My experience is that whenever there is no OK when you send AT, if the wiring is correct (for example, that Bluetooth's TX should be connected to Arduino's RX, and vice versa), the problem is the Bluetooth module's serial port speed (mySerial.begin command). Do not forget to upload the code when you change the speed smiley
12  Using Arduino / Networking, Protocols, and Devices / No-library single-byte serial transmit? on: June 04, 2014, 10:27:58 pm
I am receiving serial stream from a device at 2400 baud (device does not even have a RX line). The contents rarely changes, but when it does, once in every 5-30 s, I need to send (i.e. only TX) a single byte to one of the two bluetooth devices, depending on the changed byte in the device stream. I am using either Arduino Nano or Pro Mini (I have both, and I tried both), attaching the device to Serial, and bluetooths to digital pins over two Software Serial objects at 38400 bps.

The device stream reading works fine alone, and sending fictitious data to the two bluetooths works fine on it's own, but when all is in one code, I start missing bytes. I suspect the Software Serial interference. I have tried using bluetooths at 9600 bps, I also tried using Software Serial objects for all 3 connections, and I still loose bytes.

Now I need help. What came to my mind is a custom function that only sends a single byte over a digital line to the RX line of one of the two bluetooth modules, so I can drop the Software Serial library that I believe is causing the byte drop on the incoming stream. Anyone has, or have seen such a code?
13  Using Arduino / Programming Questions / Re: Byte array not working with in Serial.readBytes() on: June 02, 2014, 10:32:28 pm
Thanks guys. Works for me.
14  Using Arduino / Networking, Protocols, and Devices / How is this checksum calculated on: June 02, 2014, 08:12:41 pm
Does anyone see how is this checksum being calculated?

I have 10-byte data which starts with 255 and ends with checksum (effectively start byte, 8 bytes of data, and the checksum byte). Here are several examples:

Code:
255   255   255     1   0   0   255   255   255   255
255   255   255   251   0   0   255   255   255   249
255   255   255   249   0   0   255   255   255   247
255   255   255   241   0   0   255   255   255   239
255   255   255   193   0   0   255   255   255   191
255   255   255   225   0   0   255   255   255   223

(in essence, my problem is staying in sync with the data stream, since there are too many 255s to use them to latch onto the right one. And before you say "look for 3 FFs followed by three bytes and 3 FFs", the FFs other than the first one do end up having different values on more feature-loaded version of the device)
15  Using Arduino / Programming Questions / Byte array not working with in Serial.readBytes() on: June 02, 2014, 05:34:00 pm
I am trying to use a byte array as a buffer in Serial.readBytes (Arduino IDE 1.0.5-r2):

Code:
byte serialData[10];
int nBytes = 0;

nBytes = Serial.readBytes(serialData,10);

but it fails with the following error message:

Code:
error: invalid conversion from 'byte*' to 'char*'
error: initializing argument 1 of 'size_t Stream::readBytes(char*, size_t)'

...even though the Serial.readBytes reference page states:

     Serial.readBytes(buffer, length)
     buffer: the buffer to store the bytes in (char[] or byte[])
     length : the number of bytes to read (int)

What am I missing?
Pages: [1] 2 3