Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Arduino + Matlab problems on: August 28, 2013, 04:55:22 am
Hi all,
I am trying to plot data from arduino to matlab using serial port.
Now I first upload the code to arduino and then start matlab and I am able to plot the graph there.
After plotting I close the matlab plot (however the matlab software remains open).
Then if I try to reprogram the arduino, I ger the following message
Quote
Serial port 'COM 6' already in use. Try quitting any other programs that might be using it.

So then I close matlab, and then restart arduino, and then upload the code and it works.
But this is very inconvenient because restarting matlab again and again takes a lot of time.
Does anyone know a work around? Help will be greatly appreciated.

Thanks and regards

2  Using Arduino / Sensors / Re: Noob here - need help with wiring the MPU-9150 (gyro/accel) to the Uno on: July 23, 2013, 10:16:10 am
Hi,
I also see that jrowberg has removed the mpu9150 example code from github.
Any chance of someone knowing where I can find it?

https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples
3  Using Arduino / Sensors / Re: Noob here - need help with wiring the MPU-9150 (gyro/accel) to the Uno on: July 23, 2013, 09:52:58 am
hi dmelamed!
Can you guide me to the link for the processing code?

Thanks.
4  Using Arduino / Project Guidance / I2C working on Arduino Pro, but not working on MEGA 2560 on: May 17, 2013, 03:59:41 pm
Hi!
I am trying to interface analog devices accelerometer ADXL 345 with arduino MEGA. I want to be able to use I2C to do it.
I was able to get raw data from the accelerometer when i used Arduino Pro, but when working with Mega it does not give out raw values.
The code is the same, and since mega has its SDA and SCL pins as 20 and 21 respectively, I have hooked up the SDA and SCL lines to those pins.
In short what works with arduino pro, is not working with mega. I am using 3.3V supply from the mega.
How can I resolve this?
5  Using Arduino / Project Guidance / RN-42 bluetooth module power saving on: February 19, 2013, 12:54:27 am
Hi,
I have been trying to use this module and I want to save power when I am not transmitting.
Here is the user manual - http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf

Now My requirements are these
1. keep the module connected to my pc
2. transmit "Hello" to pc when a button pin 12 goes high on the arduino, this will happen by button press

So when I am not transmitting, I want to be able to keep the device in sleep mode. The command for that is SW,8000
However my module is still consuming 25 miliamps when not transmitting. Has anyone tried this?
6  Using Arduino / Programming Questions / Re: RN-42 Bluetooth HID Mouse on: February 09, 2013, 07:45:02 am
Hi!
I am facing this problem with this module -
Code:
void setup()
{
   Serial.begin(19200);
}

void loop()
{
   Serial.println("aaaaaaaaa");
   Serial.println("bbbbbbbbb");
   Serial.println("cccccccccc");
}

Now when i try to see this on the serial window, I get
aaaaaa
bbbbbbbbb
ccc
aaaaaaaaa
bb
cccccccc
and so on..
A lot of characters are lost
When i do this with a SPP module by bluesmirf, I get all the characters.
Any idea why this might be happening?
7  Using Arduino / Programming Questions / Re: RN-42 Bluetooth HID Mouse on: February 09, 2013, 07:38:56 am

Have you gotten your module to auto connect after a power cycle?

HI guys!
For autoconnect you need to put the device in pair mode. You can get that mode by sending the command "SM,6" on the uart. In this mode the module will pair up with the last device. Works well for me.
8  Using Arduino / Programming Questions / Re: Efficient shifting of values in arrays on: January 20, 2013, 09:04:57 am
Well I am trying to get the min and max values from this data.
I am not a frequent programmer, so not very well versed with the concept of pointers.
I am struggling to understand this circular buffer thing.

The idea is that the newest reading from the accelerometer should enter the array at the first spot and subsequently push the oldest reading from the last spot. I do not get how circular buffer does that, could you please be a little elaborate.
Thanks.
9  Using Arduino / Programming Questions / Re: Efficient shifting of values in arrays on: January 20, 2013, 08:47:57 am
Don't move data, move pointers to data.
Much quicker.


Can you give me a small example of how to do that?
Thanx
10  Using Arduino / Programming Questions / Efficient shifting of values in arrays on: January 20, 2013, 08:38:39 am
Hi!
I am using the accelerometer ADXL 345.
I get the x_acc from the deivce.
I want to store these values in an updating array of 50 values. So everytime I get a new value that gets updated in X[0] and every other value moves forward by 1 place.
{
  X[0] = x_acc;
 
  for( int i = 49; i>0 ; i--)
     {
       X = X[i-1];
     }
}

But because of this long for loop i loose some values that come from the device. Is there a more time efficient way of doing this?
11  Using Arduino / Project Guidance / Re: Bluetooth for sending keystrokes on: January 19, 2013, 02:16:43 am
Can anyone help?
12  Using Arduino / Project Guidance / Bluetooth for sending keystrokes on: January 17, 2013, 07:16:36 am
Hello!
I want to try and make a bluetooth remote to control my pc.

http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/RN-HID-User-Guide-v1.0r.pdf
Above is a link to the RN - 42 bluetooth module HID profile guide.

My question is this,
Can I use this module to directly send keystrokes to the laptop bluetooth without the use of any external dongle.
I mean if my microcontroller sends the required code via UART to the bluetooth, then the bluetooth will convert it according to the HID code, and when this is recieved by the bluetooth of my laptop, will the laptop be able to make sense of it?
13  Using Arduino / Programming Questions / Re: Millis(), an interesting problem on: January 10, 2013, 05:02:36 pm

[/quote]

I wouldn't worry too much, you're in very good company! smiley-grin
[/quote]

Thankyou! Really appreciate the kind of quick replies i get on this forum.
14  Using Arduino / Programming Questions / Re: Millis(), an interesting problem on: January 10, 2013, 02:30:28 pm
Well, that wasn't an interesting problem, it was an embarrassing one. smiley-red
15  Using Arduino / Programming Questions / Millis(), an interesting problem on: January 10, 2013, 01:38:09 pm

Quote
long t1 = 0;
long t2 = 0;
void setup()
{
  Serial.begin(9600);
}

void loop()
{
  t1 = millis();
  t2 = t1 - 1000;
  while(t2<t1)
  {
    t2 = millis();
   }
 
  Serial.println("Hello");
 
}

Above is a simple code using millis function in arduino. According to me, it should print "Hello" on serial after a second passes.
However "Hello" keeps printing all the time, there is not a delay of 1 second between 2 prints.
Can anyone try this code and figure out why?
Pages: [1] 2