1

I'm developing an interactive LED table for an university assignment that is being controlled by an Arduino Mega2560 which gets the information about which LEDs should be lit in which colour from a Java application that runs on a Raspi 3b+. So far everything is almost finished and the program is running quite smoothly.

The whole time I've been developing the Java application on a PC and it worked just perfect. Now I wanted to move the application to the Pi to have a runnable demo for a meeting with my advisor. Therefore I wanted to check on which USB port the Arduino connects to the Pi so I can setup the corresponding part of the Java code correctly. As I also wanted to set a specific descriptive port name on which the Arduino is always accessible for the Java application I followed this tutorial.

In a previous attempt where I still used 2 Arduino Duemilanove that step worked however when I now try to find the Arduino Mega with dmesg | grep ttyUSB I get no results and ls -l /dev/ttyUSB* only tells me that there is no such path or directory. I also retried that with one of the Arduino Duemilanove in case the USB cable was defective but in that case it returned a valid result.

As the code that I need to run on the Arduino is too extensive for using 2 Arduino Duemilanove (due to the array size to represent the table) I definitely need to run this on the Mega. After many attempts to find a solution I didn't find anything that helps me in my situation as every thread on a similar topic was about a board that wasn't recognized on any machine (whereas my Mega gets recognized on my normal Windows PC). As the Duemilanoves get recognized seamlessly I conduct that it's probably not a problem caused by the Pi (or at least not only the Pi).

I read that using a powered USB hub could be a possible solution. However, as the Arduino itself is powered by a power supply I suppose that using a powered USB hub would not help much in this case? However I'd be happy if someone proved me wrong in this case and solving the issue was as easy as that.

3
  • Did you try /dev/ttyACM0? Jun 10 '19 at 16:29
  • I didn't until you mentioned it as I'm not really familiar with Linux systems. But it seems that it found something. I'll have a look into what that ttyACM is exactly and will provide more information as soon as possible.
    – Samaranth
    Jun 10 '19 at 16:56
  • @Edgar Bonet Thank you so much, it works perfectly now. If you want to make your post an official answer I can mark it as accepted answer.
    – Samaranth
    Jun 10 '19 at 18:16
1

The newer Arduinos, like the Uno or Mega 2560, have a different way of managing the Serial ↔ USB translation, compared with the older Duemilianove. From the Linux side, you shouldn't see much difference, except that the device is now /dev/ttyACM0 instead of /dev/ttyUSB0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.