Ardino-Nano-BLE-Sense "Send Data With Sound" Chirp Project Issue - arduino

I am having some issues with the Send Data with Sound Project on Arduino. I have my Arduino nano BLE sense, ChirpSDK by Asio Ltd Version 3.4.0 installed, I put in the CHIRP_APP_KEY, CHIRP_APP_SECRET, CHIRP_APP_CONFIG from the chirp website, and I also have the Arduino nano BLE board selected when uploading the code. But for some reason I keep getting this error below:
ChirpColor:22:10: error: chirp_connect.h: No such file or directory
#include "chirp_connect.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
chirp_connect.h: No such file or directory
Any help would be very much appreciated, thanks.

The SDK functions have been renamed in the latest release. So connect is replaced with sdk.
With the latest version, you need to
#include "chirp_sdk.h"
See the latest header file for the function declarations - https://github.com/chirp/chirp-arduino/blob/develop/src/chirp_sdk.h

Related

How do I control computer mouse with M5StickC Plus?

I recently purchased the M5StickC Plus and wish to control computer cursor with it. However I'm having trouble compling the program.
Here is the error message when I installed the mouse library:
#include "HID.h"
^~~~~~~
compilation terminated.
Multiple libraries were found for "Mouse.h"
Used: C:\Users\Jerry\OneDrive\Documents\Arduino\libraries\Mouse
Not used: C:\Users\Jerry\AppData\Local\Arduino15\libraries\Mouse
exit status 1
If I uninstall the library it looks like this:
#include "HID.h"
^~~~~~~
compilation terminated.
exit status 1
What seems to be the problem here and how do I solve it?
The M5StickC Plus only provides serial communication via USB. It cannot emulate a USB HID.
You need an MCU that provides a real USB interface to run this example.
But you can implement a bluetooth mouse and keyboard if it's any comfort to you :)

Arduino code won't upload

I'm working on a small weather station and yesterday everything was working well. This morning I changed some code and suddenly this came up when I wanted to upload the code to my Adafruit:
java.io.IOException: Cannot run program "{runtime.tools.bossac-
1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file
specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:713)
at processing.app.SketchController.exportApplet(SketchController.java:686)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot
find
the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
An error occurred while uploading the sketch
Even simple code won't upload anymore. Could someone help me with this? I tried so many things already and I can't figure it out.
Thanks.
I had the same problem with my Adafruit Feather M0. I opened the platform.txt file (running Wordpad as an administrator) located at
C:\Users\[yourPC]\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.2.9\platform.txt
and changed the line
tools.bossac.path={runtime.tools.bossac-1.7.0.path}
to reflect the actual path of the bossac.exe file (mine was at)
C:\Users\[yourPC]\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.2.9\tools\
After restarting Arduino, I was finally able to upload a sketch to my M0.
I have been experiencing the same issue. I found that if I went to my Board Manager and downgraded my Feather boards from 1.6.18 to 1.6.17 it fixed the problem.
java.io.IOException: Cannot run program "{runtime.tools.bossac-
1.7.0.path}/bossac": CreateProcess error=2, The system cannot find the file
specified
The above line says the path to bossac.exe command line application for ATSAMD micro was not found.
Simply Goto --> C:\Users[yourPCnamehere]\AppData\Local\Arduino15\packages\arduino\tools\bossac
Did you find bossac.exe file there?
If not then that's the problem. Simply uninstall the Arduino from your PC and delete the above directory Arduino15 if you have an offline copy of Arduino and then install new version. bossac.exe tool will come with the Arduino package.
Please try this and see if it helps.

Can't Flash Code to Particle Photon

I have a Particle Photon which I'm trying to setup. I've tried flashing code both from the web IDE, and locally and it always times out. The device is connecting as it can be seen in these pictures:
The web IDE does not give me much information. It only says "Request Timed Out". This is what I get when I try to flash an .ino code
MacBook-Pro:Desktop User$ particle flash ABCDEFGH123456789 sketch_jun09a/
Including:
sketch_jun09a/sketch_jun09a.ino
attempting to flash firmware to your device ABCDEFGH123456789
Flash device failed.
Request Timed Out
And when I try to flash a firmware.bin file this is what I get:
MacBook-Pro:Downloads Usesr$ particle flash --usb firmware.bin
Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D firmware.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x080a0000, size = 5224
Download [=========================] 100% 5224 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
Error writing firmware...dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: Error during download get_status
I've seen online that the firmware.bin file seems to be compiled for the Particle Core, and not the Photon, so the device does not allow the code to be flashed. How should I compile the code for it to work? Is there any other solution to this problem? Thank you in advance.
You won't be able to flash a Core firmware to a Photon (they have different architecture and firmware layout). To compile the code for photon you can also use the CLI:
$ particle compile photon sketch_jun09a/
the resulting binary can be flashed using the CLI the same way you did.
To figure out the failed over the air flash I would recommend contacting the support.

Running an Arduino program in NetBeans 7.3

I am using Arduino and NetBeans in my project. My final work is to switch from Arduino program to Java. I managed to install an Arduino-NetBeans plugin as described in Arduino - NetBeans Plugin detail
My Arduino program includes
Serial.begin(9600); /////// Serial.print();
I get an error saying that "Unable to resolve identifier Serial". How can I solve this?
this is what you have to add to your source file:
#include <Arduino.h>
// imports the Serial class to allow log output
extern HardwareSerial Serial;
then it will work.
As answered by cgo you can add extern HardwareSerial Serial;
Or into your Project Settings, go to BUILD > C++ COMPILER > PREPROCESSOR DEFINITIONS and add: __AVR_ATmega328P__ (if you are working with Arduino UNO)
The message "unable to resolve identifier Serial" means that the compiler is searching for the variable Serial, but cannot find its declaration. You should check if you include all header files properly. I don't know the NetBeans plugin, but I guess the Serial-structure/class is initialised there.
If that is not helping, you should check the compiler otions and set them to default, as described on the project-site.

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