Show Posts
Pages: 1 [2] 3
16  Using Arduino / Networking, Protocols, and Devices / changing I2C bus speed on: April 11, 2013, 08:16:16 am
Hello
I was trying to look at the I2C bus. I downloaded the master and slave sketches from the tutorials and adapted a "poor man's person's oscilloscope" Processing sketch I found on the internet to have two traces. The arduino part is:

Code:
#define ANALOG_IN_1 A4
#define ANALOG_IN_2 A5

void setup() {
  Serial.begin(115200);
}

void loop() {
  int val1 = analogRead(ANALOG_IN_1);
  int val2 = analogRead(ANALOG_IN_2);
  Serial.write( 0xff);
  Serial.write( (val1 >> 8) & 0xff);
  Serial.write( val1 & 0xff);
  Serial.write( (val2 >> 8) & 0xff);
  Serial.write( val2 & 0xff);
}

The Processing part just graphs it.

Although the "scope" does appear to draw what is finds on the bus it seems to be way too slow to get the I2C signals or it is losing messages. I am not sure which. The signals are both just permanently high with an occasional (extremely) brief dip.

I tried to slow down the bus by changing
Code:
 #define TWI_FREQ 100L
//  #define TWI_FREQ 100000L
but this does not seem to have done it. I am not even sure if it worked.

Please help.

P.S. I want to look at the bus out of curiosity not for some application.
Thanks for taking the time to look
Mrs Z
17  Using Arduino / Interfacing w/ Software on the Computer / Re: Sending a text message from processing to arduino on: April 09, 2013, 03:09:53 pm
I understand what you mean, I thought I could see it with  the serial monitor but I will try to check with processing, thank you.

EDIT : How can i read the data's which are sent to Arduino with Processing ? is there a function for Processing like Serial.read ?
Hi
It is done with a library in Processing:

http://processing.org/reference/libraries/serial/index.html

The commands are remarkably similar to those on the Arduino.

Mrs Z
18  Using Arduino / Interfacing w/ Software on the Computer / Re: reading data from serial port on: April 03, 2013, 12:04:07 pm
Hi ageurtse
I was facinated by your post because your code, although unvenventional, looks like it should be able to download your 1280 bytes correctly before it started again through loop. I cannot comment on the GLCD part as I do not have one. I tried this on an Arduino Uno and found that it could, in fact, download the 1280 bytes if I sent them from processing one at a time. However, I could create a very similar problem to yours by setting the bauds rates to a different value at either end e.g. 9600 on processing to match the 115200 on the Arduino and I wondered if that was causing your problem?
Mrs Z

[Edit] I can also get the problem to happen if I start sending the data to the Arduino before it is ready to receive it.
19  Using Arduino / Microcontrollers / Re: Looks like we have clones that look real on: April 03, 2013, 06:17:50 am
If the official distributors list is up to date then that makes this item pretty scary as it is not even cheap!

http://www.ebay.co.uk/itm/Arduino-Due-32-bit-Buy-from-an-authorised-Arduino-Distributor-Limited-Stock-/111029081519?pt=UK_Computing_Other_Computing_Networking&hash=item19d9d955af

and if you look at the writing near the GND pins ...

I am shocked. No wonder Mr Z thinks I am naive.
20  Using Arduino / Microcontrollers / Re: Looks like we have clones that look real on: April 03, 2013, 03:27:59 am
Quote
By including the logo he is claiming the boards were made by Arduino.  There are not.  By including the logo he is lying.  By including the logo he is not "very honest".
Unfortunately, the way the internet works, probably no one has the resources to go
after ripoff artists in other countries except for CocaCola and Apple.
Hello again
Arduino may not have the resources to chase "Arduino fraud" but we could have a "Does this look genuine" sticky for people to post links before they buy. I, personally, would not be able to tell the difference between a genuine board and a fake (although I am a little wiser now) so I would guess lots of people are in this situation. Searching for a few minutes on ebay reveals a few "not so sure" boards so this could also serve as a 'name and shame' which could affect their business.
I have bought from the seller in question and found him to be very straightforward and honest so I would give him the benefit of the doubt and assume he was taken in himself. However, my policy is to buy some 'official' products to help out and some cheaper products to keep within budget and I object to being deceived.
Mrs Z
21  Using Arduino / Microcontrollers / Re: Looks like we have clones that look real on: April 02, 2013, 04:23:35 pm
Hi
This one says it is official and has the same little green fuse

http://www.ebay.co.uk/itm/Arduino-Mega-2560-R3-Latest-2012-Version-Made-in-Italy-Official-USB-Board-/321072990239?pt=UK_BOI_Electrical_Components_Supplies_ET&var=&hash=item4ac171081f

Is it a fake?
22  Using Arduino / Microcontrollers / Re: Sharing a crystal on: March 28, 2013, 10:16:09 am
Alternatively (and saving a pin), connect the crystal + caps to one of the atmega mcus as usual. Then connect XTAL2 of that chip to XTAL1 of the other. You might possibly need to use a series resistor of about 1K between those 2 pins, but I doubt it. No need to change any fuses.
Fabulous dc42. I read the instructions this time (  smiley-red ) and this does work. I have downloaded a couple of sketches with this configuration and it seems fine. However, I also bought a $3 programmer from china  smiley-grin.

Thanks again
Mrs Z
23  Using Arduino / Microcontrollers / Re: Sharing a crystal on: March 27, 2013, 10:30:07 am
Hi angel12345
Thank you for your reply. Google translate says it is Spanish and that you said

"My question is that I am calling DOS RF MODULES WITH 2 ARDUINO IS WHAT I WANT TO GET THE ISSUER FOR ATMEGA 328p INDEPENDENT AND DO IT BECAUSE I WANT TO DO BUT when I record MY OTHER PROGRAM CAN NOT FEED THE MICRO TRANSMITTER communicate my message but with the in micro arduino if normal ie not get the message I CAN DO NOT YOU PUT AN cryztal Condesandores 16,000 and two of 22uf? I can remove my doubt?"

Perhaps you could help with the translation as I do not speak any Spanish at all.

24  Using Arduino / Microcontrollers / Re: Sharing a crystal on: March 27, 2013, 10:00:33 am
Hi
Thank you both for your replies. I have tried your suggestion dc42 with two chips on a breadboard running blink and it seems to work. Unfortunately, my arduino as ISP doesn't  smiley-sad-blue However, it does not work with the crystal and caps either so I will have to investigate as I recently upgraded and it could be a lot of things causing the problem.
Thanks for your help.

It was very kind of you to post the suggestions for saving space on my board, CrossRoads. That kind of sophistication is a little beyond me at the moment. I only have pad or vero board and a simple 12W soldering iron I bought at Homebase 20 years ago. Maybe next year ... who knows what Santa might bring smiley-grin.

Thanks again
Mrs Z
25  Using Arduino / Microcontrollers / Re: Sharing a crystal on: March 27, 2013, 07:54:50 am
Reply #10 in that thread tells you what you need.
I found that installing a 2nd 31 cent crystal and two 3 cent caps was easy also, no messing with the fuses.\

The datasheet discusses how it uses internal buffers to make the crystal oscillate to make the system clock.
http://www.atmel.com/devices/ATMEGA328P.aspx

Thanks for this. It wasn't the cost. I have the parts. It was the space on the board and the knowledge.
26  Using Arduino / Microcontrollers / Sharing a crystal on: March 27, 2013, 07:19:18 am
Hello
I was searching to see if it were possible to share a crystal between two atmega328p-pu. I found some threads such as
http://arduino.cc/forum/index.php/topic,127418.0.html
I cannot configure one to take the clock from the other (not just because I wouldn't know how to!) as I want to make a programmer and share the crystal if possible.
What I would like to know is:
How does the arduino use the two pins to get a 'clock' from the crystal?
Why can I not share them?
Thanks
Mrs Z
27  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino <---> Processing comunication with XBEE on: March 27, 2013, 03:58:44 am
Hi
I think your problem is that you are assuming that all of your characters are in the serial buffer "if Serial.available()" but some of them may not have arrived yet although you have not explicitly stated what is happening in your code so this is just a guess as to what is going on.
You could solve this (if it is the problem) by waiting until you have enough characters (if you know that you always send the same number of chars) or waiting until you have the terminator character in the buffer before processing the "message". Serial.available() will tell you how many characters you have waiting. Bear in mind, if you wait for the terminator, you will need to be able to store the message read so far between calls to your procedure in some kind of global or otherwise permanent variable that you clear when finished.
28  Using Arduino / Installation & Troubleshooting / Re: New installation, libraries and great organisation. on: March 23, 2013, 12:11:49 pm
Hi
Thank you both. Problem solved.
Mrs Z
29  Using Arduino / Installation & Troubleshooting / Re: New installation, libraries and great organisation. on: March 23, 2013, 07:58:39 am
Hi
Thanks for the reply, John. I am using Windows Vista. The libraries are in /..../arduino/arduino-1.0.0.4/libraries.
Are you suggesting that I put them in my own sketch library?
30  Using Arduino / Installation & Troubleshooting / New installation, libraries and great organisation. on: March 23, 2013, 07:15:50 am
I noticed today that my version of the arduino IDE was outdated so decided to install 1.0.4.

I had to maually go through the libraries folder, compare the directories and move all of the libraries that I had installed into the new version.

There are lots of people that are far more organised than me and probably have a great system for storing their arduino libraries so that they do not have to do this. I want to keep the new libraries in the arduino file system not my home directory.

Please share your fabulous filesystem organisation ideas with me.

Thanks.
Mrs Z
Pages: 1 [2] 3