Scheduler.h library Arduino - arduino

I am trying to use the Arduino library Scheduler.h. I copied the code from here <1> and I imported the libary, but it didn't compile. Here the compilation error code.
Error:
Arduino: 1.6.9 (Linux), Placa:"Arduino Nano, ATmega328"
AVISO: a biblioteca Scheduler alega rodar em arquitetura(s) [sam e pode ser incompatível com sua placa atual, que roda em arquitetura(s) samd].
/tmp/ccAyeLMX.s: Assembler messages:
/tmp/ccAyeLMX.s:588: Error: constant value required
lto-wrapper: /home/ullisses/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/avr-gcc returned 1 exit status
/home/ullisses/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
exit status 1
Erro compilando para a placa Arduino Nano
Please, how can I fix this?

As indicated by the warning message, the Scheduler library is written for SAM and SAMD architecture. The Arduino Nano you're attempting to compile for is AVR architecture so you can't use the library for that board. If you read the page you got the code from you will notice it says:
Hardware Required
Arduino Due Board
I recommend studying File > Examples > 02.Digital > BlinkWithoutDelay and the tutorial page for that example, which demonstrates a more sensible method for achieving multiple blinks on AVR.

Related

Arduino Keybard Library

I wrote this code:
#include <Keyboard.h>
void setup() {
Keyboard.begin();
Keyboard.print("Hello!");
}
And Iam getting the error
C:\Users\nobody\sketch_feb12a\sketch_feb12a.ino: In function 'void setup()':
C:\Users\nobody\sketch_feb12a\sketch_feb12a.ino:4:3: error: 'Keyboard' was not declared in this scope
Keyboard.begin();
^~~~~~~~
exit status 1
Compilation error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
I tried installing Keyboard.h from a zip and from the Library manager.
What do I have to change?
If you're trying this on a board that supports emulating USB devices, such as the Teensy, then you need to select keyboard option for USB Type:
Tools > USB Type > Keyboard
This library does not work for the Arduino Uno or similar boards.
Have you use the board like Leonardo? If you try to compile code with keyboard for the board which doesn't support HID interface, you will get this error.

I am trouble getting my esp32 working on Linux

I am using garuda linux specifically. Im getting this error
`Sketch uses 227017 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 21760 bytes (6%) of dynamic memory, leaving 305920 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.2.1
Serial port /dev/ttyUSB0
A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist
A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist
`
The usb0 port shows up when i plug in the esp32, and im able to select it on arduino. So it obviously does exist. So i thought maybe i dont have the cp2102 driver. I try to install it, and i get this error
make -C /lib/modules/uname -r/build M=/home/sovadirr/Desktop/espdriv modules
make[1]: Entering directory '/usr/lib/modules/6.0.9-zen1-1-zen/build'
CC [M] /home/sovadirr/Desktop/espdriv/cp210x.o
/home/sovadirr/Desktop/espdriv/cp210x.c:290:35: error: initialization of ‘void (*)(struct usb_serial_port )’ from incompatible pointer type ‘int ()(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
290 | .port_remove = cp210x_port_remove,
| ^~~~~~~~~~~~~~~~~~
/home/sovadirr/Desktop/espdriv/cp210x.c:290:35: note: (near initialization for ‘cp210x_device.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /home/sovadirr/Desktop/espdriv/cp210x.o] Error 1
make[1]: *** [Makefile:1849: /home/sovadirr/Desktop/espdriv] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.0.9-zen1-1-zen/build'
make: *** [Makefile:7: all] Error 2
I am very confused, because would the esp32 not show on arduino if i didnt have the driver? I believe i have the esp32 devkit v1, it says on the back of the board.
*rom incompatible pointer type ‘int ()(struct usb_serial_port )’ [-Werror=incompatible-pointer-types]
From the looks of it, this has happened in OpenSuSE, Debian, Manjaro, and Arch.
This is a fix for Putty. I'm not sure how to apply it to the esp32 driver. I don't have much time, so don't expect results from me today. I'm not any expert. I'm just sharing my attempts.
https://github.com/xmm7360/xmm7360-pci/pull/159
These links seem to work on the issue. Watch out for the few that just turn the errors off.
https://github.com/xmm7360/xmm7360-pci/issues/141
https://github.com/xmm7360/xmm7360-pci/issues/137
Thanks,
Pat

"#include <avr/eeprom.h>" in Arduino-IDE?

After a long time I tried to get back in Arduino Programming. But with my old code I get the following error:
fatal error: avr/eeprom.h: No such file or directory
#include <avr/eeprom.h>
^
compilation terminated.
exit status 1
So why doesn't he find the avr library. Do I need to install it manually? And where can I find a download of it?
The <avr/eeprom.h> is available only for the AVR architecture. It's not possible to use it on other MCU architectures.
And ESP8266 is definitely completely different MCU architecture.

Getting error while compiling Freertos library in Spark fun Arduino Pro Micro

Im Using latest arduino nightly build v 1.6.10 to compile sample program for Arduino Pro Micro Which uses ATmega32U4. I just downloaded FreeRtos Library from Library Manager. Using very simple empty sketch to compile using #include
but im getting following errror while compiling:
C:\Users\Rajendra\Documents\Arduino\libraries\FreeRTOS\src\variantHooks.c: In function 'initVariant':
C:\Users\Rajendra\Documents\Arduino\libraries\FreeRTOS\src\variantHooks.c:88:2: error: 'USBDevice' undeclared (first use in this function)
USBDevice.attach();
^
C:\Users\Rajendra\Documents\Arduino\libraries\FreeRTOS\src\variantHooks.c:88:2: note: each undeclared identifier is reported only once for each function it appears in
exit status 1
Error compiling for board SparkFun Pro Micro.
what is the possibility for getting this error?
This question was raised as Issue #22 on my FreeRTOS library, in July 2017.
Best resolved by ensuring that the latest version of the Library is installed.

esp8266 12E doesn't connect to internet

This is my first Arduino application, and I have programmed it and learned on it.
It runs and can create a blinking app, and even by entering through Serial.
But when I try to connect it to the internet, it gives
Fatal Exception 12
.
The board I am using is D1 Wemos (Retired). I am programming it using Arduino. I am currently running 1.6.8 version, but tried 1.6.5, and the same happens.
I tried to run the examples from esp8266 library... they as well don't run. sometimes I get
est Jan 8 2013 errors and then in the end wdt reset
but now, I get
warning: espcomm_sync failed error: espcomm_open failed error:
espcomm_upload_mem failed
I am not sure what is the issue? any body that has an idea?

Resources