Show Posts
Pages: 1 2 3 [4] 5 6 ... 8
46  Using Arduino / Networking, Protocols, and Devices / Re: I2C help needed on: March 04, 2013, 12:31:01 am
I really do not know, All i can tell you is that it says not found. If I try the scanner with an LCD I have i see it operates correctly and finds the LCD Address.
On the data sheet is says you can program the address but it only allows 1 time. I have not done this as yet so is it possible that it will not answer an inquiry (Whatever the scanner is sending) but will respond to a write command if the correct default address is used?
47  Using Arduino / Networking, Protocols, and Devices / Re: I2C help needed on: March 03, 2013, 03:24:38 pm
Quote
Is it 66 or 112?
Sorry, the comments were from original code. It is 66 that can communicate with. I have the manual bits set to A1=0 and A2 = 1 so according to the data sheet the defalt address is 10000 plus A2 A1 which is 1000010 = 66 and this works.
I tried the I2C scanner but it does not find any device.

Quote
The datasheet doesn't show the ability to do sequential reads.  I would read the two registers separately:
When I try that code, it seems to be random data that doesnt change logically when I rotate the device.
3543
407
2826
2425
2930
2610
2482
2610
3183
1571
1630
990
1758
1306
656
716
2827
2186
767
53
3891
3699
3571
807
1058
801
736
601
538
730
794
602
538

Using my posted code I get good data smoothly changing as i rotate the device
14
74
76
75
220
579
801
1160
1473
1691
2005
2256
2427
2663
2832
3024
3251
3520
4038
4303
4624
4914
5220
5922
6707
7407
7946
8529
9568
10686
11401
12014
12632
12637
12640
12718
13130
13520
14093
14244
14463
14802
14697
14698
I am just trying to understand why I only get this result when reading register 255 with 2 bytes? How does it get the readings from 254 in there.
48  Using Arduino / Networking, Protocols, and Devices / Re: I2C help needed on: March 03, 2013, 01:38:39 pm
btw, the I2C table is on pg21. The device also does SPI and PWM but the I2C information is very minimal.
49  Using Arduino / Networking, Protocols, and Devices / Re: I2C help needed on: March 03, 2013, 01:26:59 pm
Hi John
Thank you.
http://www.ams.com/eng/Products/Magnetic-Position-Sensors/Magnetic-Rotary-Position-Sensors/AS5048B
50  Using Arduino / Networking, Protocols, and Devices / I2C help needed on: March 02, 2013, 07:07:38 pm
I am tring to understand and learn I2C better  and in doing so have come accross the following question.
I am using part of the I2C example code on the Arduino Learning website for the WIre Library SFR_Ranger reader.
My particular I2C device has a 14-bit reolution and the data is stored in Registers 254 and 255. In 255 the bits 6 and 7 are not used, hence the 14 bits.
Question 1)
I am confused about why I read register 255 in the code with 2 bytes, I would have thought it should read register 254 first but that just gives garbage.

Question 2)
In the statement
Code:
reading = reading << 6;    // shift high byte to be high 8 bits
I read the correct 14 bit data with range of 0 - 16383.
If I change the 6 to an 8 as in original code, which i understand is 16 bit, the output range is 0 - 65535. While I assume this is just the 14 bit data interpolated into the 16 bit range so resolution would not be any greater, My question is how does it do this? It is now reading 8 bits from each register but 2 of the bits are unused in the first register.

The answer is probably staring me in the face but i dont get it.

here is the working code.

Code:
#include <Wire.h>

void setup()
{
  Wire.begin();                // join i2c bus (address optional for master)
  Serial.begin(9600);          // start serial communication at 9600bps
}

unsigned int reading = 0;

void loop()
{
 
 Wire.beginTransmission(66); // transmit to device #112
 Wire.write(byte(255));      // sets register pointer to echo #1 register (0x02)
 Wire.endTransmission();      // stop transmitting

  // step 4: request reading from sensor
  Wire.requestFrom(66, 2);    // request 2 bytes from slave device #112

  // step 5: receive reading from sensor
  if(2 <= Wire.available())    // if two bytes were received
  {
    reading = Wire.read();  // receive high byte (overwrites previous reading)
    reading = reading << 6;    // shift high byte to be high 8 bits
    reading |= Wire.read(); // receive low byte as lower 8 bits
    Serial.println(reading);   // print the reading
  }

  delay(300);                  // wait a bit since people have to read the output :)
   
}
51  Using Arduino / Displays / Re: Newhaven Display NHD‐C0220BiZ New LCD driver library on: February 16, 2013, 08:13:59 pm
After a struggle i have managed to get this library working with a newhaven COG LCD NHD-C0216CiZ-FSW-FBW-3V3

http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf
the only part i am now struggling with is the Contrast setting.
The specified command
lcd.setContrast(14);
seems to do nothing. Supposedly it has a range between 0-15 but there is no change.
I do not understand the implementation in the data sheet of the follower circuit as this seems to be tied to the follower settings.
Has anyone got any experience using this library successfully that may have an answer?

Thanks
52  Using Arduino / Displays / Re: using LCD numeric displays without controller on: January 06, 2013, 01:10:32 am
Thank you very much for the advice. It seems like it is much easier to stick with the units that have a driver. The reasson I was looking at changing is i am trying to save space from the Bulky 8x2 display I am using now. I dont really need a baclight and i could do what I need with just 3 1/2 characters. Does anyone know of a compact lcd without the big metal frame and backlight that has a driver chip on board?
53  Using Arduino / Displays / using LCD numeric displays without controller on: January 05, 2013, 07:37:17 pm
I have been trying to find a tutorial or discussion on using Numeric LCD displays that do not have a built-in controller. These are the 3.5 digit types that look like a Dip.
Is there a way to use these with Arduino or do you have to install a controller for it?
Sorry if this covered elsewhere.
54  Using Arduino / Project Guidance / Re: BLUETOOTH + IPHONE + ARDUINO on: January 01, 2013, 03:16:11 am
You can connect bluetooth to iphone with HID profile..
Here is a post and an app tonrecieve the data..
http://arduino.cc/forum/index.php/topic,136076.0.html
55  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Bluetooth JY-MCU on: January 01, 2013, 03:12:48 am
Iphone will not connect to this bluetooth device. You can however use a HID profile over bluetooth and it connects fine.
Here is a post about it
http://arduino.cc/forum/index.php/topic,136076.0.html
56  Development / Other Hardware Development / Re: Using Arduino DFU Serial on your own projects on: December 11, 2012, 10:10:36 pm
Thank you. a$2000 fee? thats not going to happen.
Thanks again
57  Development / Other Hardware Development / Using Arduino DFU Serial on your own projects on: December 10, 2012, 05:08:14 pm
I apologise if this is covered somewhere else. I produce a small device loosly based on the Uno and also uses Atmega 16U2 for USB Serial. I use Amel AVRISP II to upload UNO DfU firmware to the chip and of course it enumerates just like an UNO and the descriptor is Arduino UNI by Arduino.cc.
How can I change this to install as my own descriptor instead of Arduino? I dont really understand all the jargon in the readme file about PID and VID. Hoping someone can shed some Layman light on this.

Thanks
58  Development / Other Hardware Development / Re: Small-run PCB assembly on: December 10, 2012, 04:50:21 pm
I used PCBCart.com
They make PCB's and also have assembly plant. Very reasonable, under $2 for an Uno type SMD board excluding components. Even with components it was reasonable.
59  Community / Products and Services / Re: Send Arduino data to Iphone -HID - Magic MonitorX on: December 07, 2012, 09:33:06 pm
HI
You can purchase it with HID Pre-Loaded at Roving Networks
http://www.rovingnetworks.com/products/RN_42
The part number is actually RN-42 HID @ $16.95
You can also buy it already mounted on a breakout board with a level-shifter on-board for $39, part number RN-42-SM, but you have to specify to them that you want the HID Profile pre-loaded.

Thanks
60  Community / Products and Services / Send Arduino data to Iphone -HID - Magic MonitorX on: December 06, 2012, 08:08:52 pm
As everyone knows, Apple blocks most paths to get data into the iPhone from a MCU via Serial or bluetooth. After trying many apparent solutions I decided HID was a simple way to do it. A new App on the Appstore called Magic Montor X uses the HID profile to send data from your Arduino or any other RX/TX device to the iPhone. Basically HID emulates a keyboard so it reads the incoming data in ASCII format. HID bluetooth is portable so you're not stuck with Ethernet Shield. It is cheap, you can add a HID bluetooth module for about $17 or even cheaper if you know how to implement HID profiles.
You can send up to 7 different data messages to the iphone and each will appear in a different "Monitor" Window. There are also 6 LED's you can turn ON or OFF. All this data will update each loop of your sketch.
You can customise the display to show 1 to 6 Data windows and name the units for each window.
The simplest solution I found is using roving Networks RN-42 and simply connecting it to RX/TX. It pairs seamlessly with iPhone and then you can just serial.Print data to the phone.

Control characters are used to get the correct data to the intended data window.
It is wireless and so much better than an LCD display.
Any questions, let me know
https://itunes.apple.com/us/app/magic-monitorx/id583180732?mt=8
Pages: 1 2 3 [4] 5 6 ... 8