ESP32DMASPI in ardunio uno as SPI master - arduino

I am trying to configure Arduino uno as SPI-master and ESP32 as SPI-slave using hideakitai/ESP32DMASPI , when I am compiling the code for esp32 it is compiling successfully but when I select Arduino board it is showing an errors.
The error - fatal error: driver/spi_master.h: No such file or directory
I searched a lot about the issue & for driver/spi_master.h library, but not getting the proper help.

The library you're using, hideakitai/ESP32DMASPI is written for the ESP32, not the Arduino Uno.
The Arduino Uno is completely different processor from the ESP32 and uses a completely different implementation of the Arduino framework. The Uno's low level hardware (SPI, DMA, I2C, etc) is different from the ESP32's. The library you're using is not intended to work on the Arduino Uno and as you've seen it does not.
You need to find a library that does support the Uno or learn a whole lot about low level coding and rewrite the library you're trying to use to work with the Uno.

Related

Is it possible to factory reset an arduino from hardware to remove bad user code?

I was troubleshooting why Serial1 was always throwing undefined errors in sketches I was trying to run when I found a solution posted online for a slightly different board that suggested this line:
HardwareSerial Serial1(2);
I uploaded it and now the Arduino doesn't show up in the IDE, did I remap it's serial communications? Why is this possible!
Is there any hardware factory reset option available on these boards? Did I just brick my device?
edit: It seems the STM32Cube programmer app can be used to communicate with the device but I'm not sure where to get the original firmware to flash. https://imgur.com/a/LbiHenf
Assuming from the tag in your question, I guess you have an STM32 – (BluePill) Development Board (STM32F103C8).
If you think that your board is not handling serial communication properly then you might consider burning bootloader to your board. This will reset the complete configuration of your board.
There are many ways in which you can burn bootloader to your board.
Using another Arduino board like Uno / Nano / Mega
Using an FTDI USB to TTL Serial Adapter.
You might want to go through tutorials list below:
Getting Started with STM32 using Arduino IDE: Blinking LED
Programming STM32F103C8 Board using USB Port

How to upload example code of ESP8266 to arduino uno?

I am using ESP8266-01 with Arduino Uno... I am able to compile example code of ESP8266 with Generic ESP8266 module board with arduino ide but unable to upload it to Uno...., it is giving an error: espcomm_upload_mem failed while uploading the code to Uno
How the code is compiled is based on the board you have set in the Arduino IDE.
Before you compile and upload, have you switched the IDE to use an Uno board?
In the Arduino IDE try:
Tools | Board | Arduino Uno
Esp8266 generic example will not run on Arduino Uno. Possibly your device is selected as Esp8266 from Device Manager as gurus said. What you need to run Uno with Esp is writing Esp8266 serial controller to Uno. Here is the sample. Good luck.

Arduino ESP8266 Library

I am new to arduino and just picked up myself an UNO and an ESP8266 module. I've managed to wire them all up properly and connected to my home network using the AT commands.
But now im trying to follow tutorials on the internet but the problem is every example includes a library
#include <ESP8266WiFi.h>
such as this example tutorial https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/example-sketch-ap-web-server
So I have tried googling for it but can't find anything. I'm assuming thats because its really simple and Im missing something quite obvious.
help?
If you wish to use the Arduino as the main part of your ESP8266 project, there are several ways to go.
Use the Arduino to issue AT commands to the ESP8266.
Create your own protocol or messaging system by programming up the
ESP8266 with (for example) nodemcu or the Arduino/ESP8266 project or
Espressif or others, then program up your Arduino with the same
protocol or messaging system so the two may talk.
Alternatively, just program your ESP8266 directly. No Arduino required. Doing so, you can turn the tables and get the ESP8266 to issue messages to the Arduino if for example if you wanted the many GPIO and sense pins of the Arduino to do something. If you only need a couple of extra GPIO pins, look at the ESP8266 range to get more GPIO pins, such as the ESP8266-12
Which to choose?
nodemcu will give you a good idea of the capabilities of the ESP8266
and may be a good starter, easy to flash, easy to program, but it is a poor finisher except for the most basic of programs.
espressif has a large toolchain, not pleasant to flash,
you'll be at the cutting edge, however the community support is
minimal
The Arduino/ESP8266 project is awesome, easy to flash, very fast,
very stable, and unlike nodemcu you can create a large project. As you noticed, any arduino project starting with #include <ESP8266WiFi.h> is not for the arduino, but for the ESP8266 using the arduino IDE https://github.com/esp8266/Arduino
The Sparkfun example, it's for the ESP8266 Thing and it's using the Arduino ESP8266 Core, to flash the module.
It's not Arduino code that communicates with the module over serial. You need to upload this code to ESP module and with the Arduino ESP8266 Core, it's possible to program the ESP directly from the Arduino IDE.

Talk to I2C Devices connected to Arduino from Processing

I want to talk to devices that are connected to an Arduino from the Processing IDE and interface with the I2C communications protocol. The processing language is used to send command and data bytes to the arduino with the Firmata protocol. This is done with an existing arduino and Firmata library. I have been going through the library and it seems that there is functionality on both the Arduino and Processing sites to support I2C communication to devices connected to the Arduino, but there is no method to do that from processing. I have tried to create a method to do that but I couldn't get anywhere.
Can someone please help me ?
To anyone who might be interested of, I have found a solution to extend Processing Firmata Library to support additional features.
Based on this tutorial http://www.instructables.com/id/Going-Beyond-StandardFirmata-Adding-New-Device-Sup/ you have to edit Processing Arduino and Firmata Library, which are written in Java. Then compile the two and replace them in the source folder.
Then follow the tutorial to extend the Arduino Firmata Library on the Arduino end.

Using an Arduino as a regular AVR

I'm planning to do a project using ATmega (I can't use an Arduino directly because of my university's restrictions). But I really want to use the Arduino's IDE, serial monitor, plotting graphs using Processing for debugging purposes. Can I dump my regular ATmega code into an Arduino and use serial monitor for debugging purposes?
Can I use an Arduino Uno board just like any other normal AVR development board so that I can get the best of both worlds. I googled it, but I didn't get the answer I need.
If you mean using the Arduino's AVR microcontroller without the Arduino libraries: that's perfectly possible. You're going to have to mess with some lower-level stuff, though. You can get some inspiration from what I have done so far with libavrutil.

Resources