Arduino yum hangs on bootup when using Firmata - arduino

I am using the StandardFirmata on a new Yun.
https://gist.githubusercontent.com/edgarsilva/e73c15a019396d6aaef2/raw/b00e100f1551d87e30f49e5ac98517370e699ee2/StandardFirmataForATH0.ino
Everything works great while I am in Linux.
But as soon as I reboot, the Yun linux will not come up (seems like networking doesn't come up).
I am using the latest Yun build.
UT, the problem is that after a reboot, the device will not boot Linux (maybe Linux interfaces are down).
for whatever reason, these lines are causing the problem:
Serial1.begin(57600); // Set the baud.
Firmata.begin(Serial1);
but if I do it like the original file:
Firmata.begin(57600);
the Linux works fine on boot, but I can't get Firmata to work if I take that line...
so it's a catch 22..
PLEASE HELP, I have already worked on this for 2 days and can't find a solution on google,
Thanks for reading,
Sean.

FIXED:
yes I had the same issue..
using node.js and Firmata.
FIXED:
in /usr/lib/node_modules/firmata/lib/firmata.js edit the line
if(typeof port === 'object'){
this.sp = port;
} else {
this.sp = new SerialPort(port, {
baudrate: XXXX,
buffersize: 1
});
}
and set XXXX to be 9600
and in StandardFirmata set the same:
Serial1.begin(9600); // Set the baud.
now Node.js speaks to Firmata no problem!!!!!!!
hope this helps someone get their Arduino Yun to speak to Firmata / Cyclon.js

Related

How to compile and flash attiny88 with arduino-cli?

I can't understand, what device-name I should use for attiny88? For example, string for my old nano was arduino:avr:nano:cpu=atmega328old
I installed cores for attiny in arduino-cli, and test this board in ArduinoIDE and it works well, but I want to use arduino-cli.
(Sorry for my English)
Found the solution, this string named as FQBN. And I can get this FQBN for all my boards after exec command arduino-cli board listall

VSCode: Arduino Board Configuration offers no boards to select

After I used VSCode (current version 1.61.0) and the Arduino IDE (1.8.13 / 1.8.16 - WIndows installer version) for about a year on two Windows 10 devices both devices stopped showing available Arduino / ESP8266 board types yesterday.
The Arduino board configuration only shows one item "Selected Board:" with an empty drop down.
The Arduino IDE on both devices still works (Tools - Boards show the familiar collection of boards)
My settings (searched for Arduino) are
{
"arduino.path": "C:\\Program Files (x86)\\Arduino"
}
on both devices - I have not changed this since the setup about a year ago and the Arduino IDE is still there und my c-drive.
What else can I check or what settings might lead to an empty board selector?
Its a bug in v0.4.6 of vscode arduino extention. Roll back to v0.4.5 and before, Works fine.
Same problem here. I think its a bug in the vscode extension. My workaround is to manually set the Bord type in the .vscode/arduino.json file. Simply add the
"board": "arduino:avr:uno", line to your json and it will work.
{
"port": "COM5",
"board": "arduino:avr:uno",
"sketch": "example.ino"
}
First you need to install the board you need from:
View / Command Palette / Arduino: Board Manager
Then you can select your board from:
View / Command Palette / Arduino: Board Configuration

Why is "isWriteable" returning false using QSerialport?

I have a working program in QT creator on my mac that can write out an FTDI cable using QSerialport. However when I run the exact same program on ubuntu in QT creator the "isWriteable" bool returns false. All other aspects of the program run the same on mac and ubuntu. (the ftdi driver is installed on ubuntu)
Here is the section of code that keeps returning false:
if(FTDI->isWritable())
{
FTDI->putChar(gyroX);
}
Does anyone know what would cause this?
The Docs state for isWritable():
...
This is a convenience function which checks if the OpenMode of the device contains the WriteOnly flag.
See also openMode() ...
So do you open your device with the right flags ? Your should open it either with WriteOnly or ReadWrite (which contains WriteOnly) or something else which contains WriteOnly.

Arduino WiFi shield - Updating firmware

I am new in arduino and I am trying to update the firmware in my Arduino WiFi shield but I am facing some problems. I did exactly what the instructions said about the update(MacPorts, dfu-programmer, jumper) but when I am trying to run the installation there were some problems that I cannot find out. I haven't change anything in the script, and I really don't know what is going on.
Any help it will be great!!! That's exactly what I get. The problem is in lines 55, 56, 57.
Arduino WiFi Shield upgrade
Disclaimer: to access to the USB devices correctly, the dfu-programmer needs to be used as root. Run this script as root.
ArduinoWifiShield_upgrade_mac.sh: line 55: cd: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/firmwares/wifishield/scripts/hardware/tools/avr/bin: No such file or directory
ArduinoWifiShield_upgrade_mac.sh: line 56: ./avr-objcopy: No such file or directory
ArduinoWifiShield_upgrade_mac.sh: line 57: ./avr-objcopy: No such file or directory
****Upgrade WiFi Shield firmware****
Error opening the file.
Something went wrong with creating the memory image.
Done. Remove the J3 jumper and press the RESET button on the shield.
Thank you!
Thank you very much in advance.

Processing to Arduino "IllegalAccessError"

I hope this exact issue was not addressed already. I did search for a while.
So I'm using the Arduino library for Processing, testing it by simply having it blink an LED that I have connected to my Arduino UNO. I'm following this tutorial, but am having a problem a little different than the ones covered on that tutorial page. Here's my Processing code:
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int ledPin = 13;
void setup()
{
//println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[0], 57600); //error here
arduino.pinMode(ledPin, Arduino.OUTPUT);
}
void draw()
{
arduino.digitalWrite(ledPin, Arduino.HIGH);
delay(1000);
arduino.digitalWrite(ledPin, Arduino.LOW);
delay(1000);
}
Here's my error:
IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Exception in thread "Animation Thread" java.lang.IllegalAccessError: tried to access class processing.core.PApplet$RegisteredMethods from class cc.arduino.Arduino$SerialProxy
at cc.arduino.Arduino$SerialProxy.<init>(Arduino.java:119)
at cc.arduino.Arduino.<init>(Arduino.java:168)
at sketch_130206a.setup(sketch_130206a.java:29)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)
Since my error apparently has to do with access permissions, I tried doing what it says at the tutorial page I was following by going to /var/lock folder, but the /lock folder doesn't exist! I'm using a Mac 10.8.2. I searched around and found this thread (arduino dot cc/forum/index.php?topic=135164.0) and decided to try "sudo mkdir -p /var/lock" and "sudo chmod 777 /var/lock" in terminal, but it didn't change the error I have in Processing, even after restarting it. I also tried opening the Arduino app and uploading the StandardFirmata sketch as mentioned at the ProcessngxArduino library download page (playground.arduino dot cc/interfacing/processing) while trying to run the processing sketch, but same error. The fact that I'm using the Arduino UNO instead of the Duemilanove shouldn't be the issue as the UNO is apparently just an updated version of it. Any ideas what I could try to do next?
UPDATE: Okay so the highlighted error in my code is what opens the serial port I'm using at whatever rate (57600 bits/sec in this case I think). So I think the problem lies in this particular step in the instructions at the adrunio x processing info page mentioned earlier(playground dot arduino dot cc/interfacing/processing), step 3: "Configure Processing for serial: processing dot org/reference/libraries/serial/"... the link goes to processing's 'serial' reference page. I'm confused about what is meant by "configure"? How exactly do I figure out my "correct serial port"? I went through the rest of the instructions and the examples on the serial reference page, and still have no idea what I'm looking for.
UPDATE #2: My serial port for the arduino is "/dev/tty.usbmodem1411". I am still confused about how to plug this in to my code in Processing though. The things I just learned in these last 2 updates might be irrelevant to my error, I'm still unsure.
The problem was that I was using the beta version of Processing (2.0). Use the latest stable version (1.5.1) and it should work.

Resources