Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

19

Linux is a very complex operating system, but it may be able to fit on an Arduino. Things to consider: There is no current AVR port of the source code. You would have no graphics, instead access the terminal over UART. The filesystem driver would have to be rewritten to access internal flash or an external SD card. It would be extremely slow! The ATmega328 ...


16

It just doesn't have enough RAM. You'd also need to teach it to boot from flash memory, which would involve rewriting the bootloader. You can instead use an Arduino Yun or a PCDuino; while not "standard" Arduinos these support Arduino shields and run Linux. Or there's always the Raspberry Pi.


13

The easiest solution is to add yourself to the dialout group. First make a note of the output from id. Save it in file (not in /tmp as that gets cleaned out on a reboot). If you look at the output, you'll notice that your user is signed up for several groups and those groups represent extra privileges on the system. By default your Arduino is assigned to ...


9

The oft-repeated advice to "just do sudo usermod -aG dialout <username> never worked for me, and I finally figured out why. On my machine, /dev/ttyUSB0 is of the group serial and not dialout, so adding my username to dialout did nothing. # ls -l # crw-rw---- 1 root serial 188, 0 Mar 31 20:52 /dev/ttyUSB0 ^^^^^^ (group-name) ...


6

The short answer is no. Basically, you would need LOTS more ram then even the biggest ATmega has natively. It is theoretically possible to add external hardware, and program the ATmega to emulate a more powerful CPU, and run linux on that. However, on a plain arduino, it is not possible. It would be much more realistic to run linux on a Arduino Due, which ...


6

Assuming your distro is using udev: udevadm info --query=all --name=/dev/ttyACM0 You might need root privileges to run this(sudo / su). It will output a list of information like this: P: /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0/tty/ttyACM0 N: ttyACM0 S: serial/by-id/usb-Dean_Camera_LUFA_USB-RS232_Adapter_74133353537351403012-if00 S: serial/by-...


5

The Yun's OS (Linino) is based on OpenWRT, and the official toolchain from OpenWRT does not appear to have changed much. It could probably be done, the question is if you'd really want to though. The limited resources (storage, RAM, CPU) means you would most likely not fit all the parts of the toolchain for C/C++ compilation (perhaps with the exception of ...


5

And the Arduino team finally figured it out: http://blog.arduino.cc/2014/05/06/time-to-expand-your-yun-disk-space-and-install-node-js/


5

You can add an alias for each. Then you know which is which. Here is a nice tutorial on how to set this up. Here is a snippet that I wrote based on the tutorial. In the below example, I am using a FTDI RS232RL USB to Serial adapter, which I believe is what the Arduino uses too. In order to assign an alias to a USB-Serial device, we need to find some info ...


4

What's causing the problem is that the folder name inside the zip has a hyphen in it, just extract the folder from this zip and rename it to timer instead of timer-master. I just imported it on Fedora 20.


4

This is quite easy! You have to customize the ftdi chips firmware and add an udev rule: First, get ftdi_eeprom via apt-get or from the sources. Identify your device via lsusb and get the id: lsusb Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC .... Prepare a config and make sure, that vendor_id and ...


4

If you want to get maintained (automatically updated) version of Arduino IDE then you install if from a package repository with its dependencies e.g. using apt-get: sudo apt-get update sudo apt-get install arduino arduino-core However, this way you get a very old version (currently 1.0.5). Obviously, it is not updated too often if at all. If you already ...


4

I have had very similar problems with my yun(shields) and I found the stty command to be very crucial for a good working. I use following command and it works with mega and due on the yun stty -F ${PortName} ${SerialSpeed} raw -clocal -echo icrnl Since I call these I can redirect from and to /dev/ttyxxx without problems. As far as I can see you mis the ...


4

Linux Getting Arduino and Arduino-like boards working properly under Linux can be a troublesome task if you are not familiar with how Linux works. So I am going to introduce you to some of the basic tools you will need to work out why your board isn’t working as you’d like it to work. The majority of problems a new user is faced with boil down to one ...


4

Have you tried setting the web editor's baud rate to both the old and the new values? I ask because the CIOBAUD command has been obsolete for a while now so, depending on the age of your device, it may have done nothing. The command was replaced by "AT+UART_CUR" and "AT+UART_DEF" which have a different syntax. See this answer to a similar question. Update: ...


4

After much frustration in trying things, I came across this forum post which advised: sudo systemctl stop ModemManager.service If this works, disable the service from starting next boot: sudo systemctl disable ModemManager.service It seems like setting ENV{ID_MM_DEVICE_IGNORE}="1" in a udev rule is insufficient.


3

I would have used a script to make an alias under /dev/ and also set group and rights on it with udev like the other answers. But if I didn't have udev I would pipe lsusb into grep or awk, like lsusb|grep -e "idProduct". Anyway, with udev rules or with lsusb and grep to identify USB devices, use idVendor, idProduct and iSerial in Device descriptor part of ...


3

On Ubuntu 16.04 (and maybe previous versions or other distribs too), you can do: > ls /dev/serial/by-id which displays (on my box where an Arduino UNO is connected): usb-Arduino__www.arduino.cc__0043_A4139363931351318241-if00 You can easily spot the Device ID 0043 (UNO) here. This file is actually a link to /dev/ttyACM0 in my box.


3

The Arduino uses AVR libc which does not provide a complete C++ environment. Among other things AVR libc does not support new and delete. See the FAQ for more information. Some versions of the Arduino libraries may provide new and delete but they are just wrappers around malloc and free. I suggest not using new and delete on arduino because they do not ...


3

I am using Yun as well for my projects. I don't boot from SD card, but I store a lot of Python code there and it works for me. I've also seen this article that might be interesting for you. I haven't tried to do it on my Yun but I think it should work... This is example how to install node.js on the Yun (SD card), so in theory you could use the same approach ...


3

First of all, you must test if the device that you are trying to access, actually exists. The device file may change when you replug the Arduino. The easiest way to accomplish that is to find the device name in the error message, in this case /dev/ttyACM1. Then check two things: Does the device file exist in the /dev tree? ls -l /dev/ttyACM* Is the Arduino ...


3

For the sake of completeness, on the more traditional boards where the USB interface is not implemented from the main "sketch" processor, there are three other potential possibilities: Use the (USB) serial data interface, and have software on the host computer which accepts commands over that. Obviously, the downside is requiring installation of something ...


3

The USB VID, PID and Serial Number are all programmed into the chip when you upload your sketch. The VID and PID are tied to the board, and the serial number is always the same regardless of which board. So no matter which board you program it will get the same details as any other board of the same kind. There's no option to change the serial number (...


3

The USB devices are created dynamically. You might find this question and answer from the SE Raspberry Pi helpful: How to force rescan of USB serial devices?. You can use the dmesg(8) command on the Pi to see the messages generated by the USB sub-system. Watch the output to see if there are errors associated with the Arduino dropping off the bus. This is ...


3

Setting baud rates in a C program isn't a trivial task. You need to use the low-level open() instead of fopen() and act on the returned file descriptor with ioctl() or tcsetattr() / tcgetattr(). The former method allows the setting of non-standard baud rates while the latter only allows specific baud rates to be used. I wrote a C++ class to deal with it ...


3

The problem here is that there are multiple flavours of linux each with their own installation and package management systems - Aptitude, Yum, EMerge, etc. It is not easy for Arduino to keep up with creating packages for each and every system, so instead they create a single tarball that can be used on any of the systems. At one point Arduino (or someone,...


3

No, you can't. All you have is a UART interface through a USB to UART adaptor. It can only ever be a UART. The best you could get would be to write a program to run on the NodeMCU that did the monitoring for you (assuming you can get it into a suitable promiscuous mode) and report information back to you through the UART.


2

Arduino Yun, Leonardo, Esplora and Due have the ability to appear as a native Mouse and/or Keyboard to a connected computer by use of the Mouse and Keyboard libraries. Here's an example of how you would use SWITCH3 on the Esplora to active PAGE UP on your keyboard. if (!Esplora.readButton(SWITCH_3)) { Keyboard.press(KEY_PAGE_UP) delay(100); Keyboard....


2

Your connections are incorrect if you are "straight through" connecting. Gnd & Vcc are adjacent on the processor board and separated by 2 pins on your converter. If you find Gnd, Vcc, TX, RX on USB module and processor then you should Connect Gnd to Gnd Connect Vcc to Vcc Connect ........TXD to RXD and ........................RXD to TXD Ensure that ...


2

I have several clone Pro Minis I got from several sources on ebay for ~ £2 ($3) each. I also use Ubuntu (10.04 on this old PC but it's fine). I started with a USB converter similar to yours and it was a bit hit-and-miss choosing when to press the reset to upload. Once I got connections right and worked out when to press reset it became a more reliable ...


Only top voted, non community-wiki answers of a minimum length are eligible