DmxSimple

Hi,

I want to use DMX with my Arduino DUE, so I do what is describe in this link :

https://code.google.com/p/tinkerit/wiki/DmxSimple

Problem, when I'm compiling this code :

Code:

#include <DmxSimple.h>

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

Error message :

Arduino : 1.5.7 (Windows smiley-cool, Carte : "Arduino Due (Programming Port)"

C:\Users\Flo\Documents\Arduino\libraries\DmxSimple\DmxSimple.cpp:6:20: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^
compilation terminated.

Can you help me please?

Thank you.

What is the wiring connections ?
You haven't posted any code.
There is no code in the sketch you posted.
Use the "#" CODE TAGS button when posting code.

The DmxSimple library was last released in 2009 by the look of it, and uses
assembler, so its not ported to the Due and it would not be trivial to do so.

Find another DMX512 library?

Hi,

For raschemmel,

I just wanted to compile this empty code.

#include <DmxSimple.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Have you an other librairie to use DMX with the Arduino Due?
Because DmxSimple don't work I think.

Waitinig for your answers.

Thank you.

DmxSimple doesn't work for the Due and it's possibly too much work to port it to the ARM hardware platform. The only other DMX library I know for the Arduino (DMXSerial: GitHub - mathertel/DMXSerial: An Arduino library for sending and receiving DMX packets.) is also not directly compatible with the Due but probably much easier to port.

What hardware are you using? Why did you choose a Due over a classic Arduino?

Hi pylon,

I don't understand why when I compile only the line with the library, I have this message :

Arduino : 1.5.7 (Windows 8), Carte : "Arduino Due (Programming Port)"

In file included from sketch_sep01a.ino:1:0:
C:\Users\Flo\Documents\Arduino\libraries\DMXSerial-master/DMXSerial.h:17:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
                    ^
compilation terminated.

Is the library in a bad folder? Normally, when I compile nothing, I shouldn't have mistake? I don't understand...

Seriously ? You really don't know why a library won't compile when the folder name for the library is :
DMXSerial-master ?

It would appear that this is the first library you have ever installed. You should be getting a little pop up every time you launch the IDE that tells you that the library with this name "DMXSerial-master" won't work. The reason is that when you install a library, the FIRST thing you have to do is rename the folder to remove the "-master" part from the filename.

At this point, I think you need to learn how to install them properly. If you open the IDE and select "Files\Preferences" you will see the path for the libraries you install (where you should be installing them).

Hi, thanks for your answer.

Effectively, I start on Arduino so it's not very easy first.

I do like you said, but the problem is the same.
The thing which I don't understand is :

  • In tools -> Type of card, when I select an Arduino Uno, when I compile this code :
#include <DMXSerial.h>

void setup() 
{
}

void loop()
{
}

It's Ok, but when I choose Arduino Due, I have the same error than previously.
Where does the problem?

Thanks for your answer.

floppp:
I don't understand why when I compile only the line with the library, I have this message :

Arduino : 1.5.7 (Windows 8), Carte : "Arduino Due (Programming Port)"

In file included from sketch_sep01a.ino:1:0:
C:\Users\Flo\Documents\Arduino\libraries\DMXSerial-master/DMXSerial.h:17:20: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
                    ^
compilation terminated.




Is the library in a bad folder? Normally, when I compile nothing, I shouldn't have mistake? I don't understand...

I wrote that even DMSSerial is not compatible as it is with the Due but it's much easier to adapt than DmxSimple. If you expect a DMX library that runs out of the box, don't use a Due, use an UNO or Mega2560. The Due uses a different hardware (processor core) than the first generation of Arduinos and because of that many libraries that are developed with low level, hardware specific calls won't run on the Due.

I ask again:
What hardware are you using? Why did you choose a Due over a classic Arduino?

@pylon,
Be that as it may, do you agree with my assessment that the compilation error shown is due to the OP failing to rename the library folder and trying to compile a library with the folder name :
DMXSerial-master ?

raschemmel:
@pylon,
Be that as it may, do you agree with my assessment that the compilation error shown is due to the OP failing to rename the library folder and trying to compile a library with the folder name :
DMXSerial-master ?

I agree that it should be named "DMXSerial" but in my experience (which is limited to the Linux platform) the IDE compiles correctly even if the library folder isn't named the way the documentation tells you. So I guess that the error the OP experiences is caused only by the fact that he compiles for the Due and that the compilation succeeds if the code is compiled for the UNO (for example).

Maybe this will help convince you.
I rename the LiquidCrystal library folder in the IDE libraries folder in C:\Program Files (x86)\Arduino\Libraries to "LiquidCrystal-master".

Attached are the following:
1- screenshot of LiquidCrystal library folder renamed to LiquidCrystal-master
2-screenshot of IDE with compiler error for "LiquidCrystal does not name a type"
3- Notepad file of compiler verbose output.

From OP's compiler error post:

 fatal error: avr/io.h: [color=red]No such file or directory[/color]

From verbose output in attached notepad file:

 [color=red]No such file or directory [/color]

PS- And yes it works perfectly without the "-master" in the library folder name.

Library folder name error.txt (1.03 KB)

Maybe this will help convince you.

You don't have to convince me :).

The OP's output shows clearly that the library is found and that there is an error during the header pre-processing. An include file specific to the AVR-8bit platform is not found. You're error says something different and is not directly related to the OP's problem.

  Arduino : 1.5.7 (Windows 8), Carte : "Arduino Due (Programming Port)"

In file included from sketch_sep01a.ino:1:0:
C:\Users\Flo\Documents\Arduino\libraries\DMXSerial-master/DMXSerial.h:17:20: fatal error: avr/io.h: No such file or directory
 #include <avr/io.h>
                    ^
compilation terminated.

The OP's output shows clearly that the library is found

I don't see it. Which part shows that the library is found ?
Doesn't "No such file or directory" mean that it is not ?
I'm not following you.

raschemmel:
@pylon,
Be that as it may, do you agree with my assessment that the compilation error shown is due to the OP failing to rename the library folder and trying to compile a library with the folder name :
DMXSerial-master ?

The error shows that the DMXSerial.h file is being compiled and contains an AVR-specific
reference. So clearly DMXSerial.h has been found.

Is there no way to carry the code for an ARM, as on the DUE?

Is there no way to carry the code for an ARM, as on the DUE?

If "carry" means "port", yes, it's possible to port that code to the DUE platform but you'll need some in-depth knowledge of the target processor and it's quite some work.

Why do you need the Due? You still did not provide any information about why you had to choose the Due over a classic Arduino or an embedded Linux solution (which may run on ARM too). For these platforms there are existing DMX solutions. You also did not tell us what DMX hardware you have.

I take the Due because I thinked it was very completed, but I didn't see his application with the DMX. I have already an Arduino Uno, I can send DMX, now I will see to receive DMX. Is there another library?

I'm started in Arduino so the DMX with the Due, I'll waiting I think. :slight_smile:

I have already an Arduino Uno, I can send DMX, now I will see to receive DMX. Is there another library?

What for? DMX? For the UNO you have the choice between DmxSimple and DMXSerial, what do you need what these don't provide?

Do you have a schematic for your DMX interface ? I'm curious to see what you are sending it to . The tutorial you linked is for lighting control. So what is the target device ? Have you run the code in the tutorial you linked in your first post ?