So... what are you building with your GIGA boards?
Do share pictures or tell something about your projects! We at Arduino are very curious to see what you're using them for
So... what are you building with your GIGA boards?
Do share pictures or tell something about your projects! We at Arduino are very curious to see what you're using them for
Arduino GIGA R1 - Double Ethernet
Very often, for industrial or very particular applications, it is mandatory to separate the ethernet networks and work with two IP addresses from different groups.
For example, if we need to collect data from a PLC that has a private network and convey them to a server/mes, we need to be able to manage two different IP addresses.
Or, if we want to create a protocol converter between two devices on different networks
To do this we need two Ethernet adapters that can be configured with two different IPs and which, it would be great, could work in parallel.
Unfortunately, the Arduino boards, until now, were equipped with only one SPI interface to which to connect a SPI/Ethernet module (for example Ethernet Shield or similar).
Today with Arduino GIGA R1 WIFI things change: we can use two WIZnet Ethernet adapters on two SPI ports and make them work simultaneously and thread-safely.
Here, you can find detailed schematics and library:
https://github.com/davenardella/Ethernet_SPI2
Enjoy
Hi,
It's my first arduino.
I make a custum multi utility tool:
Hi, great demo!
you have connected audio output to portable speker and portable speaker has an amplyfier inside, right?
Also, connecting microphone modul like this: Modul Mikrofonu s Analogovým Výstupem pro Arduino Vysoká citlivost | dratek.cz is ok? It will not destroy my board?
Thanks
I just had to jump on the integrated DACs for some DSP experiments. Here, I implementet a DSP Diode Clipping Algorithm for Overdrive and Distortion Effects.
Just made a video showing the Distortion / Overdrive effect on the Arduino GIGA R1:
Update (22/08/23): Now I also implementet an audio Tremolo Effect.
Article and full example code: Tremolo DSP Effect for Arduino | Baltic Lab
Snowfall effect.
Unzip attached file.
Giga R1 and GigaDisplay.
Zermat-SwissAlps.h in zip file below:
Zermat-SwissAlps.zip (544.6 KB)
Copy code below, paste into a new .ino in Arduino IDE and save it.
Add unzipped Zermat-SwissAlps.h into saved folder.
// Credit for the snow effect goes to
// https://github.com/raphaelchampeimont/arduino_TFT_display_snow/tree/main
#include <Arduino_GigaDisplay_GFX.h>
#include "ArduinoGraphics.h"
#include "Zermat-SwissAlps.h"
#define TFT_CYAN 0x07FF
#define TFT_RED 0xf800
#define TFT_BLUE 0x001F
#define TFT_GREEN 0x07E0
#define TFT_MAGENTA 0xF81F
#define TFT_WHITE 0xffff
#define TFT_BLACK 0x0000
#define TFT_YELLOW 0xFFE0
GigaDisplay_GFX tft;
const int DISPLAY_WIDTH = 800;
const int DISPLAY_HEIGHT = 480;
// "Physics" engine grid size
const int PHY_DISP_RATIO = 3; // Physical cell size in pixels
const int BITS_PER_CELL = 1;
const int CELLS_PER_BYTE = 8 / BITS_PER_CELL;
const int PHY_WIDTH = DISPLAY_WIDTH / PHY_DISP_RATIO;
const int PHY_HEIGHT = DISPLAY_HEIGHT / PHY_DISP_RATIO;
const int GRID_TOTAL_CELLS = PHY_WIDTH * PHY_HEIGHT;
const int GRID_SIZE_BYTES = GRID_TOTAL_CELLS / CELLS_PER_BYTE;
byte grid[GRID_SIZE_BYTES];
int FLAKE_SIZE = PHY_DISP_RATIO;
const uint16_t BACKGROUND_COLOR = 0b0000000000000111;
const uint16_t SNOW_COLOR = 0b1111111111111111;
// To measure FPS
unsigned long loopSpeedCounter = 0;
unsigned long previousReportTime = millis();
void setup() {
Serial.begin(115200);
tft.begin();
tft.setRotation(1);
tft.drawRGBBitmap(0, 0, zermat_swissalps, zermat_swissalpsWidth, zermat_swissalpsHeight);
Serial.print("Number of grid cells: "); Serial.println(GRID_TOTAL_CELLS);
Serial.print("Size of grid in bytes: "); Serial.println(GRID_SIZE_BYTES);
memset(grid, 0, GRID_SIZE_BYTES);
}
void loop() {
unsigned long now = millis();
// Make it random
randomSeed(analogRead(A0));
//FLAKE_SIZE = PHY_DISP_RATIO + random(2);
FLAKE_SIZE = PHY_DISP_RATIO;
// Simulate falling snow
for (int row = PHY_HEIGHT - 2; row >= 0; row--) {
for (int col = 0; col < PHY_WIDTH; col++) {
if (getCellValue(row, col) == 1) {
int futureCol = random(col - 1, col + 2);
// Check snow flake did not leave screen and future cell is empty.
if (row > 460) {
if (futureCol >= 0 && futureCol < PHY_WIDTH && getCellValue(row + 1, futureCol) == 0) {
}
}
setCellValueTo1(row + 1, futureCol);
setCellValueTo0(row, col);
// }
}
}
}
// Create some new snow
for (int col = 0; col < PHY_WIDTH; col++) {
if (random(25) < 1) {
setCellValueTo1(0, col);
}
}
delay(20);
// To compute FPS
if (now >= previousReportTime + 1000) {
Serial.print(loopSpeedCounter); Serial.println(" FPS");
loopSpeedCounter = 0;
previousReportTime = now;
}
loopSpeedCounter++;
}
byte getCellValue(int row, int col) {
int cellIndex = row * PHY_WIDTH + col;
return (grid[cellIndex / CELLS_PER_BYTE] >> (cellIndex % CELLS_PER_BYTE)) & 1;
}
void setCellValueTo0(int row, int col) {
int cellIndex = row * PHY_WIDTH + col;
grid[cellIndex / CELLS_PER_BYTE] &= ~(1 << (cellIndex % CELLS_PER_BYTE));
renderVoid(row, col);
}
void setCellValueTo1(int row, int col) {
int cellIndex = row * PHY_WIDTH + col;
grid[cellIndex / CELLS_PER_BYTE] |= 1 << (cellIndex % CELLS_PER_BYTE);
//Serial.print("grid = "); Serial.println(grid[cellIndex / CELLS_PER_BYTE] |= 1 << (cellIndex % CELLS_PER_BYTE));
renderFlake(row, col);
}
void renderFlake(int row, int col) {
//PHY_DISP_RATIO = FLAKE_SIZE + random(2);
if (random(2)) {
tft.drawFastVLine(col * PHY_DISP_RATIO + PHY_DISP_RATIO / 2, row * PHY_DISP_RATIO, FLAKE_SIZE - 1, SNOW_COLOR);
tft.drawFastHLine(col * PHY_DISP_RATIO, row * PHY_DISP_RATIO + PHY_DISP_RATIO / 2, FLAKE_SIZE - 1, SNOW_COLOR);
} else {
tft.drawLine(col * PHY_DISP_RATIO, row * PHY_DISP_RATIO, col * PHY_DISP_RATIO + PHY_DISP_RATIO - 1, row * FLAKE_SIZE + FLAKE_SIZE - 1, SNOW_COLOR);
tft.drawLine(col * PHY_DISP_RATIO, row * PHY_DISP_RATIO + PHY_DISP_RATIO - 1, col * PHY_DISP_RATIO + FLAKE_SIZE - 1, row * FLAKE_SIZE, SNOW_COLOR);
}
}
void renderVoid(int row, int col) {
int x = col * FLAKE_SIZE;
int y = row * FLAKE_SIZE;
for (int ROW = 0; ROW < FLAKE_SIZE; ROW++) {
tft.drawRGBBitmap(x, y + ROW, zermat_swissalps + x + ((y + ROW) * zermat_swissalpsWidth), FLAKE_SIZE, 1);
}
}
Hey? I can't find the zermat swissalps library? Can you send it to me on discord my discord is "Fyrekitten", a googe drive link would work also
fyrekittenvt:
Added instructions and Zermat-SwissAlps.h to a zip file in post #10.
ty!!
Hi, it's really nice and interesting. I would like to insert another image, but I can't figure out how to convert it (I have a Mac). I've tried converters, but I don't know the parameters and the image is always distorted. could you give me some help? Thank you
I have been working on a library that allows stuff like drawing triangles and rectangles efficiently on giga r1. Further I have also made a slightly more complex function that replaces two partially overlaying rectangles without having to paint over areas where they intersect twice or clearing whole screen then painting.
I have combined this into an example, where a camera feed is inputted, and gets displayed, with possibility of gestures using fingers, including zoom rotation and movement, where the code is setup so if one or two fingers are touching any pixels on the screen, after moving the same pixels will be under the fingers allowing for seamless gestures. While on lower zooms, as this is more efficient, each pixel of the display “asks” for a pixel from camera, if the image is more zoomed in the feed, instead each camera pixel draws a rectangle on screen, and when the image is moved or transformed, the replacement of rectangles function is used to ensure I don’t have to paint over the whole previous area again.
Sadly I am unable to upload a video to the forum.
Further I also made a project that in some aspects offers more ADC customization than the advanced analog Arduino example as the frequency can be specified more directly, and it also has a DMA transfer function for multiple adc modes.
Here is a nifty little scope I've been working on....
There are some problems with analog input that need to be worked out, and a reasonable analog front end built. Of interest might be the libraries I've developed for UI functions on the Giga Display. From the readme:
The Giga R1 boasts impressive ADC statistics with two independent 1Msps ADC's and a configurable op-amp, making it possible to have a competent scope with few or no additional components.
The display is 800x480, which is just about enough for a small scope (I'd love a 7" smartphone sized display, can we have one soon please?). UI clutter is kept to a minimum by using touch screen gestures made possible by the multi-touch hardware, but there are also menus to select options more conventionally.
Inputs are 0-3.3V on the A0 and A1 pins. A simple voltage divider may be used to read higher voltages, or a bias from +3.3V used to allow both positive and negative inputs.
Library dependencies: