Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: MLX90615 in PWM mode interfaced with Arduino UNO on: April 21, 2014, 12:31:33 am
I was running into this problem with MLX90615, either.  The libraries I used were found on github, and the i2c address was changed from 0x5A to 0x00. The sensor seemed working since it gave out ambient temperature and object temperature values, but the two values did not vary at all, even though my hand was  1-2cm close to it or was left.

Ambient = 49.43*C   Object = 49.43*C
Ambient = 120.97*F   Object = 120.97*F
Ambient = 49.43*C   Object = 49.43*C
Ambient = 120.97*F   Object = 120.97*F
2  Development / Other Software Development / Re: CodeBlocks Arduino IDE - real C++ IDE for Arduino development (rev.20130827) on: December 10, 2013, 09:18:13 pm
It is out of work accidentally, it could compile the project and have problems in generating HEX file
3  Using Arduino / Installation & Troubleshooting / Re: Is it a flaw of Leonardo's Serial? on: November 25, 2013, 09:03:32 am
The Leonardo was reset while the host application kept the Serial opening,  if I tried to close and reopen the serial port in host application, it would throw out the following exception under Win7, even though the serial port was detected by the Windows already and the serial port number was just same as the previous one before resetting.

   System.IO.IOException: The specified port does not exist.
   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
   at System.IO.Ports.InternalResources.WinIOError()
   at System.IO.Ports.SerialStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.Ports.SerialPort.Dispose(Boolean disposing)
   at System.IO.Ports.SerialPort.Close()
   at leo.MainForm.BtnCloseClick(Object sender, EventArgs e) in c:\Users\ardypro\Documents\SharpDevelop Projects\leo\leo\MainForm.cs:line 52
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at leo.Program.Main(String[] args) in c:\Users\ardypro\Documents\SharpDevelop Projects\leo\leo\Program.cs:line 27

4  Using Arduino / Installation & Troubleshooting / Is it a flaw of Leonardo's Serial? on: November 21, 2013, 10:57:18 am
Hi, all,

After uploading sketch into the Leonardo, it would not be restarted as it did with UNO or Mega when the Serial Monitor was opened, because sometimes I need monitor the debugging message by serial port from the very beginning, so I pushed the reset button to force the board to restart, unfortunately the port disappeared and the host application went into idle.  It made no difference if trying to close and reopen the serial port in the host application.  The workaround might be closing the host application and then restarting it again.

If the Leonardo was used in production situation, the host application communicated to the board through com port. The Leonardo was reset by accident, even if the host application detected it, it could not reconnect to the board's serial port by itself, except somebody found this failure and restarted the application manually.

So, is this a flaw of Leonardo or should I use the board in a proper way?

5  Using Arduino / Programming Questions / Why EthernetClient does not name a type? on: November 03, 2013, 08:42:54 pm
Hi, all,

I am using the Ethernet library to connect the board to the web server, but when I try to compile the following code, it throws out " 'EthernetClient' does not name a type":

#include <SPI.h>
#include <Ethernet.h>

class foo
  EthernetClient cli;

project file
#include "foo.h"
//#include <SPI.h>
//#include <Ethernet.h>

foo f;
void setup()


void loop()

It seems both the Ethernet.h and SPI.h files should be re-imported in the project file to get it work. Both of them were imported in foo.h and the project file has included the foo.h already, why does the compiler throw out the exception, even though there were no instances of EthernetClient declared at all ?


6  Development / Other Software Development / Failed in importing Ethernet lib with Jantje's plugin for eclipse on: December 05, 2012, 04:06:23 am
Hi, there,

I am trying to import the 'built-in' library Ethernet into my project under Eclipse, but it said the w5100.h was not found, after deleting it from the list in project's Includes tree node in Eclipse, it would throw out an error saying 'fatal error: pins_arduino.h:could not find the file' or, sometimes, 'fatal error: arduino.h could not find the file".  It seemed it could not find the w5100.h located under the subfolder Utility.

Any suggestions would be appreciated!

7  Development / Other Software Development / Re: How to open the project made with Jantje's plugin under eclipse on: October 21, 2012, 09:42:44 am
thank you, Jantje, for your kind reponse and your useful plugin.
8  Development / Other Software Development / Re: How to open the project made with Jantje's plugin under eclipse on: October 21, 2012, 01:03:07 am
For example, if a project was created with CodeBlocks, the ext name for the project file would be cbp, double clicked it would fire CB to open it. I did not find a project file in the files created with Eclipse, however.
9  Using Arduino / Programming Questions / Re: How to use a Timer on: October 20, 2012, 08:33:36 pm
I think you need use
if (duration1 >= 2000)
, so there might be a chance for the arduino executes codes in the block. Arduino or any other mcu could hardly execute precisely that consume just 2000 microseconds, the actual value might be 1999, 2001 or any other value around 2000.
10  Development / Other Software Development / How to open the project made with Jantje's plugin under eclipse on: October 20, 2012, 04:08:10 pm
Hi, all,

Hoping this is the correct place I ask the question.

I installed the Eclipse Indigo with Jantje's plugin for Arduino under Windows 7 and Ubuntu 12.04. Under the same OS, I knew how to creat and reopen the project created with this plugin, but if I switched to another OS, I had no idea how to open the project since the 'open project' menu item was disabled. Any sugguestions would be highly appreciated!
11  Using Arduino / Programming Questions / Re: Help with converting integer to unsigned char* on: August 01, 2012, 06:07:31 am
And why the two buffers?

One to host char type buffer and the other to host unsigned char type ubuffer. The following code snippets is quoted from internet and works for me.

void displayInt(int r, int c, int value)  //
  int number= value; // the interger should be in the range from -32768 ~ 32767
  char buf [16];
  itoa(number,buf,10); //transform integer into string
  unsigned char temp[16];

  for (int i=0;i<=15;i++)
      temp[i]=' ';
    }   // put space into those where no  values are assigned initially
  LCDA.DisplayString(r,c,temp,16);//display the counter on the screen  
12  Using Arduino / Programming Questions / Re: Help with converting integer to unsigned char* on: August 01, 2012, 05:48:55 am
Never, ever return a pointer to an automatic variable.
"ubuffer" is allocated on the stack, so becomes free for anyone else to stomp on as soon as your function returns.

should this be replaced as Int2uCharArr(int value, unsigned char &output) ?
13  Using Arduino / Programming Questions / Re: Help with converting integer to unsigned char* on: August 01, 2012, 05:45:38 am
  char buffer[5]={    '0'            };
  unsigned char ubuffer[5]={    '0'            };
So, the other 4 elements of each array are undefined. Why is that?

Thanks, Paul,  it should be "00000" instead.
14  Using Arduino / Programming Questions / Re: Help with converting integer to unsigned char* on: August 01, 2012, 05:26:13 am
I made a demo function to convert the integer to unsigned char*, the result in Serial monitor seemed correct, but when to be displayed with LCD, it did not work as expected.

unsigned char* int2uCharArray(int value)
  char buffer[5]={    '0'            };
  unsigned char ubuffer[5]={    '0'            };
  for (int i=0;i<5;i++)

  for (int i=0;i<5;i++)
  Serial.println("END TEST");

  return ubuffer;
15  Using Arduino / Programming Questions / Re: Help with converting integer to unsigned char* on: August 01, 2012, 05:09:48 am
For integer:

char temp[20];
int myNumber = 3822;



Thank you, but this code does not work, since the function in the library requires the temp[20] should be unsigned char*.
Pages: [1] 2