Show Posts
Pages: 1 2 [3] 4 5 ... 173
31  Products / Arduino Due / Re: how long sin() function takes? on: July 24, 2014, 08:34:58 am
I declared the variable as volatile , but it didn't become better.
Right, it shouldn't.  Declaration volatile keeps compiler away from doing it's tricks, when you get 5 usec results - wrong results.
32  Products / Arduino Due / Re: how long sin() function takes? on: July 24, 2014, 08:13:09 am
Good question. Short answer , that complier optimized away sin at compiling time, substituting pre-calculated result into code.
If you are using a variable, sin function works as expected, to be sure you may declare variable as volatile.
 I try to find more definitive answer, but interesting things, my googling for "benchmark cortex-M3 / ARM / SAM3 " turns blank. There is no precise timing, and only approximation:
same core M3, about 20% less cpu clock. So a lot depends on compiler,  options/ settings / environment passed  to compiler, version etc.
 You may measure timing in the "for" loop, 1000 - 10000 calculation to get better precision, with volatile declaration.
To have better than 10 usec, use LUT, likely there is a big flash memory size.
33  Using Arduino / Sensors / Re: Reading an oxygen sensor on: July 23, 2014, 07:39:29 am
Please correct me if I am wrong, but I therefore need 0-100 in .01 steps = 0=9,999 so 10000 expressed in decimal:
 512 128 64 32 16 8 4 2 1 = 9 bit with base 0 so 9 bit probably exist, so 10 bit add required?
No, 2^13 = 8192 and 2^14 = 16384
You need at least 14 bit ADC.
If readings fluctuate, try LPF or smoothing example in arduino IDE
34  Products / Arduino Due / Re: How to get a faster analogRead() ? on: July 21, 2014, 09:56:44 am
User in reply #5 of this thread
reported 1MHz
35  Products / Arduino Due / Re: How to get a faster analogRead() ? on: July 21, 2014, 09:25:33 am
What you gonna to do with data? Serial link isn't fast to transfer at high rate, and you 'd need to use DMA if SPI/I2C interface in perspective
36  Topics / Device Hacking / Re: Delete SMS on Motorola W220 with Arduino on: July 18, 2014, 07:25:10 pm
Wiki page isn't informative enough, this is why I recommend you to search a doc "AT Command Set" for motorola.
Google bring me up on second line:
and page  84 described response you get on query at+clac:
+CLAC, List of All Available AT Commands
List of available AT
The Execute command displays a list
of all the AT commands supported by
the C24.

What I may think, if this report is too long arduino may not handle it's correctly.  I'd suggest, you should test communication link to the phone using hyper terminal / putty / minicom or whatever serial link you prefer , manually first w/o arduino in chain.
See what you get, and if all looks right, than you diging into arduino library to find d an issue.
37  Topics / Device Hacking / Re: Delete SMS on Motorola W220 with Arduino on: July 18, 2014, 05:01:36 pm
Here some of the commands:
 Don't think it's correct for any model, you need to find a doc for specific chip set your mobile has inside.
Example,  "AT Command Set  SIM5350 _ATC_V1.01" says there are options expected in delete sms command:
Test Command
+CMGD: (list of supported <index>s)[,(list of supported<delflag>s)]
Write Command
+CMS ERROR: <err>
Defined values
Integer type; value in the range of location numbers supported by the associated memory and start
with zero.
an integer indicating multiple message deletion request as follows:
0 – (or omitted) Delete the message specified in <index>.
1 – Delete all read messages from preferred message storage, leaving unread messages and
stored mobile originated messages (whether sent or not) untouched.
2 – Delete all read messages from preferred message storage and sent mobile originated
messages, leaving unread messages and unsent mobile originated messages untouched.
3 – Delete all read messages from preferred message storage, sent and unsent mobile
originated messages leaving unread messages untouched.
4 – Delete all messages from preferred message storage including unread messages.
NOTE: If set <delflag>=1, 2, 3 or 4, <index> is omitted, such as AT+CMGD=,1.
38  Using Arduino / Project Guidance / Re: Proportional integral controller with arduino uno on: July 17, 2014, 03:54:20 pm
There is PID library for arduino, have you seen?  Repost your core in # tags, you can find above emoticons line.
39  Products / Arduino Due / Re: No GND or full range on DAC0 on: July 17, 2014, 07:33:40 am
It was mentioned  on this forum many times, that range of the Due DAC is only 1/6 to 5/6 Vcc. You 'd need external circuitry to get it over rail-to-rail.
40  Using Arduino / Project Guidance / Re: Ultrasonic audio amplifier. on: July 16, 2014, 04:53:35 pm
IMHO, both alternative LM386 and TDA7052 are wrong . I would search a low noise amplifier, there are microchip MCP6021/2/4 for example.  Power amplifier may works as a second stage. Old OPA NE5532 or NE5534 can still be competitive.
41  Using Arduino / Project Guidance / Re: ADK shield vs Bluetooth module on: July 16, 2014, 04:42:35 pm
same thing with  $1 Bluetooth module?
Where you have seen this price? Is it an usb dongle? If so, than you need an USB host shield for arduino, that's driving overall cost up. BT shield for arduino costs 20$ and up, same time the chiepest provide only low speed serial communication, and BT with audio RTime ( 1Mb/s or so ) costs >50$ on SFE. It's all depends on your requirements , speed + time to develop a project / against costs.
42  Products / Arduino Due / Re: Arduino Due Memory Usage on: July 15, 2014, 08:06:25 am
Try to declare Temperature as float, or cast to (float) at calculation time
43  Products / Arduino Due / Re: Due support for AVR (atmel) libraries on: July 14, 2014, 10:01:38 am

 It's more complicated on ARM, dig into datasheet for datails.
44  Using Arduino / Sensors / Re: Arduino DUE analog read broken? on: July 11, 2014, 09:57:06 am
It's strange, here is my test results:
In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4090
   In-0: 0
   In-1: 4090
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4090
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4091
   In-0: 0
   In-1: 4091
And code:
int val1;
int val2;

void setup(){
  while (!Serial);

void loop(){
  Serial.print("\n\tIn-0: ");
  val1 = analogRead(A0);

  Serial.print("\n\tIn-1: ");
  val2 = analogRead(A1);
Have you made a mistake in connection? 3.3V and 5V dangerously close.
45  Using Arduino / Project Guidance / Re: Arduino Uno with Android on: July 06, 2014, 06:02:44 am
Start from here: 

Pages: 1 2 [3] 4 5 ... 173