SINTEF-9012 / JArduino

Program your Arduino in Java
https://github.com/SINTEF-9012/JArduino/wiki
176 stars 63 forks source link

timing an analog read ... #57

Closed lobsteroh closed 8 years ago

lobsteroh commented 8 years ago

reading analog pins in jArduino appears, well, glacial .... when i time 1000 reads with this

int counter = 0;
int startT = millis();
while (counter<1000) {
    sensorValue = analogRead(sensorPin);
    counter++;
}
int durT = millis() - startT;

Arduino via IDE reports 112ms JArduino does it in, wait for it, ... 40970ms :-(

am i missing something? if true, this would relegate jArduino to a niche market, at best ...

aliassad commented 8 years ago

Did you use JArduino AdvanceGUI ?

brice-morin commented 8 years ago

Well, I will not even think about starting to potentially investigate on that issue before it has been edited and turned into a less aggressive style. Had you read the wiki, it explained some tradeoffs about JArduino (though things can certainly be improved).

lobsteroh commented 8 years ago

Hi Brice, apologies, clumsy tone ment to express my shocked surprise rather than any adversial sentiment. I had hoped that arduinos would be suited to address my i/o as well as my i2c needs. On paper it should offer a cheap and user-friendly solution, alas, my conclusion after giving it a fair shake is that the platform may not be there. A mention or reference to design intentions in the readme would be welcome. Ended up switching to linkm hardware for I2c and phidgets for everything else. Java drivers are quite straight forward in these and interfaces perform well. Got my project solved in one weekend. Still glad to have figured capabilities and limits of arduino platform. Thanks for your help.

On Mon, Apr 18, 2016, 16:32 Brice Morin notifications@github.com wrote:

Well, I will not even think about starting to potentially investigate on that issue before it has been edited and turned into a less aggressive style. Had you read the wiki, it explained some tradeoffs about JArduino (though things can certainly be improved).

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SINTEF-9012/JArduino/issues/57#issuecomment-211564768

Robert

Robert Huber, PhD Helen Putnam Fellow, Radcliffe Institute for Advanced Study Harvard University, Cambridge, MA 02138 Professor, Biological Sciences, BGSU Associate Editor - Acta Ethologica Associate Editor - Frontiers in Physiology Email: rh.bgsu@gmail.com