Recent Posts

Pages: [1] 2 3 ... 10
Code: [Select]

search the forum for "Serial Print in ISR"
Programming Questions / Re: Nesting multiple ifs
Last post by christop - Today at 07:46 pm
Why should the compiler issue a warning about something that is perfectly valid, legal syntax?  Should it then also issue a warning on "while (1);" ?
The onus is entirely on the programmer to learn the language syntax, as it should be.
Ray L.
The compiler emits warnings for similar common mistakes, even if they're legal. For example, "if (x = y)" will cause GCC to warn about using = instead of == (and it says how to make it clear that it's intentional to suppress the warning).
Project Guidance / Re: Powering a bunch of nano's
Last post by PaulRB - Today at 07:45 pm
It would be more efficient to supply all the Nanos with 5V via their 5V pins as already mentioned. If you supply 7V or 9V, the extra voltage is dropped by the Nano's regulator, resulting in wasted power. With 9V, nearly half the power will be wasted by the regulator and turned into heat.

How much power/current should your 5V PSU provide? How long is a piece of string? Each Nano will need 30~40mA for its own power. But microcontrollers are pointless if they don't control something. What will your Nanos be controlling? How much will those devices require?

Now the most important point/question. What are you using 32 Nanos for? I am immediately suspicious when a beginner says they need to use 2 Arduino in the same circuit. Almost always that is a mistake due to lack of experience or knowledge. 32 Nanos? Well, goodness me...
Hi guys!

I am working on a project with Arduino Due and I have to use interrupts. The problem is that each time code runs there comes a stray interrupt on one of the pins. Actually the code was very long and it took me several hours to find this bug. So i wrote a separate piece of code to test it. Here it is:

Code: [Select]

void ISRAF(){
void ISRAB(){

void setup(){

  pinMode(7, INPUT);
  pinMode(6, INPUT);
  REG_PIOC_DIFSR=0x01800000;    //ebounce filter is enabled
  REG_PIOC_SCDR=1600;           //set debounce time
  REG_PIOC_PUER=0x07800000;     //pins 6,7 are pulled up
  attachInterrupt(7, ISRAF, FALLING);
  attachInterrupt(6, ISRAB, FALLING);


void loop(){


Now the problem here is that each time the cpu resets there is a stray interrupt on pin 7. I have tried several options: changing the pin, using delays, disabling the interrupts in setup and enabling them after a while.... with no avail.

In the end I had to use a flag to ignore the first stray interrupt. Still I want to know what is the problem with my code. Note that i have to set the debouncing filter for the pins (nescessity of my project).

Please Help! Thanks in advance!!

Thank you very mush
Project Guidance / Re: Amazon Echo - WiFi - Ardui...
Last post by isidorito - Today at 07:42 pm
Googling "arduino amazon echo" reveals dozens of projects.
I know, but as this is a forum related to arduino, and i wasn't looking for a project but for some guidance, i thought it would be a great idea to come to the core people.

But hey, seems like i found a LoL forum or something like that, enjoy being such a great person, i wish you the best in your life.
Deutsch / Re: Atmega 328P PU
Last post by temucin - Today at 07:42 pm

besorge dir einen Arduino ISP Adapter und brenne den Bootloader direkt drauf. Das geht auch mit der Arduino IDE.

Gruss Turgut
Project Guidance / Re: Help
Last post by PetarSRB - Today at 07:40 pm
General Electronics / Re: 4 - 20 mA power supply.
Last post by vffgaston - Today at 07:40 pm
If you want a simple rugged pre-made ready-to-go RTD to 4-20mA converter, then I suggest the Burns Engineer TL21. Been around a lllooonnnggg time...for a reason. Simple robust. Works with pt100 RTDs.

Burns TL21 spec sheet.

I found a couple on for 30-40USD.
¬°Many thanks!

(Observe the opening "¬°": to give more emphasis)

Vicente ...
Programming Questions / Re: Nesting multiple ifs
Last post by J-M-L - Today at 07:40 pm
Once you understand and know the 8 types of statements and specially Compound statements then it all makes sense.
Pages: [1] 2 3 ... 10