You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -158,6 +158,16 @@ This can be very useful, as this flash storage **does not get deleted when you u
158
158
159
159
***Note: In this configuration, the USB serial port used for serial communication with the computer is occupied, so you won't be able to send or read information in the serial monitor. **This includes uploading new sketches. To upload a new sketch you need to put the GIGA R1 in DFU mode by double pressing the RST button.***
160
160
161
+
## Wi-Fi / Bluetooth® LE
162
+
163
+
***This section is only relevant for the [GIGA R1 WiFi](/hardware/giga-r1-wifi) version. The standard [GIGA R1](/hardware/giga-r1) does not have a radio module, cryptochip & and antenna connector.***
164
+
165
+
![Murata LBEE5KL1DX-883 radio module + antenna connector.]()
166
+
167
+
The Wi-Fi / Bluetooth® module onboard the GIGA R1 WiFi is the Murata LBEE5KL1DX-883. This module does not come with a built-in antenna, but an external antenna is included when purchasing the Wi-Fi version of this board.
168
+
169
+
The antenna connector (see image above) is located right next to the USB-C connector, and is of a **U.FL.** type.
170
+
161
171
## Audio Jack
162
172
163
173
The **GIGA R1** features an audio jack, with 2x DAC channels, and 1x ADC channel, and is capable of reading input from a microphone, as well as outputting sound through a speaker.
@@ -517,17 +527,15 @@ void printWifiStatus()
517
527
```
518
528
519
529
520
-
### RTC Pin
530
+
### VRTC Pin
521
531
522
-
The GIGA R1 also features an RTC pin, giving you the ability to power the RTC with a coin cell battery to keep the time even when your board is turned off, for low power timekeeping.
532
+
The GIGA R1 also features a `VRTC` pin, giving you the ability to power the RTC with a coin cell battery to keep the time even when your board is turned off, for low power timekeeping.
523
533
524
-

534
+

525
535
526
536
## Camera Interface
527
537
528
-
The Arduino GIGA features an onboard arducam compatible connector, with support for **parallel**.
529
-
530
-
Programming the board in the **MicroPython** language using the **OpenMV IDE** easily lets you get started with a neural network analysing a realtime camera feed with ML.
538
+
The Arduino GIGA features an onboard Arducam compatible connector.
531
539
532
540
To learn more about the camera capabilities of the GIGA R1, check out the [GIGA R1 Camera Guide](/tutorials/giga-r1/giga-camera)
533
541
@@ -543,61 +551,159 @@ The **GIGA R1** features a dedicated CAN bus.
543
551
544
552

545
553
546
-
>**Note:** the CAN bus does not include a built in transceiver. If you need to use the CAN bus, you can add a transceiver as a breakout board.
554
+
***The CAN bus does not include a built in transceiver. If you need to use the CAN bus, you can add a transceiver as a breakout board.***
547
555
548
556
CAN, or **Controller Area Network**, is a communication standard that allows microcontroller-based devices to communicate with each other without the need for a host computer. This means that building a complex system with many different subsystems within becomes much easier.
549
557
550
558
This makes the **GIGA R1** a powerful option for complex multilayered systems, as it can be integrated into existing systems or be used to build a new one from scratch.
551
559
552
-
The CAN pins on the **GIGA R1** are labelled `CANRX` and `CANTX`
560
+
The CAN pins on the **GIGA R1** are labelled `CANRX` and `CANTX`. Typically, transceiver breakouts are labelled with a similar syntax, and to connect them to the board, use the following wiring scheme:
561
+
562
+
| GIGA R1 | Tranceiver |
563
+
| ------- | ---------- |
564
+
| VCC | 3.3V |
565
+
| GND | GND |
566
+
| CANTX | CANTX\*|
567
+
| CANRX | CANRX\*|
568
+
569
+
***\*The name of CANTX/CANRX differs from product to product.***
570
+
571
+
Below is an example of how to send & receive data using a CAN bus.
572
+
573
+
```arduino
574
+
#include "CAN.h"
575
+
576
+
mbed::CAN can1(PB_5, PB_13);
577
+
uint8_t counter = 0;
578
+
579
+
void send() {
580
+
Serial.println("send()");
581
+
if (can1.write(mbed::CANMessage(1337, &counter, 1))) {
582
+
Serial.println("wloop()");
583
+
counter++;
584
+
Serial.print("Message sent: ");
585
+
Serial.println(counter);
586
+
} else {
587
+
Serial.println("Transmission error");
588
+
Serial.println(can1.tderror());
589
+
can1.reset();
590
+
}
591
+
}
592
+
593
+
void receive() {
594
+
mbed::CANMessage msg;
595
+
if (can1.read(msg)) {
596
+
Serial.print("Message received: ");
597
+
Serial.println(msg.data[0]);
598
+
}
599
+
}
553
600
554
-
## SPI
555
-
The **GIGA R1** features two separate SPI (Serial Peripheral Interface) buses, one is configured on the 6 pin header labelled SPI, and the other is broken out into pin connections on the board.
556
601
557
-
The pins used for SPI on the **GIGA R1** are the following:
602
+
void setup() {
603
+
Serial.begin(115200);
604
+
can1.frequency(1000000);
605
+
}
558
606
559
-
(CIPO) - D12
560
-
(COPI) - D11
561
-
(SCK) - D13
562
-
(CS) - D10
607
+
bool receiver = false;
608
+
void loop() {
609
+
if (receiver) {
610
+
receive();
611
+
} else {
612
+
send();
613
+
}
614
+
delay(1000);
615
+
}
616
+
```
617
+
618
+
## SPI
563
619
564
620

565
621
566
-
To use SPI, we first need to include the [SPI](https://www.arduino.cc/en/reference/SPI) library.
622
+
The **GIGA R1** features two separate SPI (Serial Peripheral Interface) buses, one is configured on the 6 pin header (ICSP) labelled SPI, and the other is broken out into pin connections on the board.
623
+
624
+
The second bus `SPI` uses the following pins:
625
+
626
+
- (CIPO) - D89
627
+
- (COPI) - D90
628
+
- (SCK) - D91
629
+
- (CS) - D10\*
630
+
631
+
The first bus, `SPI1`, uses the following pins:
632
+
633
+
- (CIPO) - D12
634
+
- (COPI) - D11
635
+
- (SCK) - D13
636
+
- (CS) - D10\*
637
+
638
+
***\*When connecting several devices, you also need to define additional Chip Select (CS) pins. You can use any GPIO for this.***
639
+
640
+
For using both SPI buses simultaneously, check out the following example:
641
+
567
642
```arduino
568
643
#include <SPI.h>
644
+
645
+
const int CS_1 = 10;
646
+
const int CS_2 = 5;
647
+
648
+
void setup() {
649
+
pinMode(CS_1, OUTPUT);
650
+
pinMode(CS_2, OUTPUT);
651
+
652
+
SPI.begin();
653
+
SPI1.begin();
654
+
655
+
digitalWrite(CS_1, LOW);
656
+
digitalWrite(CS_2, LOW);
657
+
658
+
SPI.transfer(0x00);
659
+
SPI1.transfer(0x00);
660
+
661
+
digitalWrite(CS_1, HIGH);
662
+
digitalWrite(CS_2, HIGH);
663
+
}
664
+
665
+
void loop() {
666
+
}
569
667
```
570
-
Inside `void setup()` we need to initialize the library
571
-
```arduino
572
-
SPI.begin()
573
-
```
668
+
669
+
Please note that the in the GIGA R1 schematics and the code does not match exactly. If you are looking at the schematics, you will notice `SPI` is `SPI1` and `SPI1` is `SPI5`.
670
+
671
+

672
+
673
+
574
674
575
675
## I2C Pins
676
+
576
677
I2C lets you connect multiple I2C compatible devices in series using only two pins. The controller will send out information through the I2C bus to a 7 bit address, meaning that the technical limit of I2C devices on a single line is 128. Practically, you're never gonna reach 128 devices before other limitations kick in.
577
678
578
679
The **GIGA R1** has three separate I2C buses of which two are usable without external components, letting you control more devices.
579
680
580
681
The pins used for I2C on the **GIGA R1** are the following:
581
682
- SDA - D20
582
683
- SCL - D21
583
-
- SDA1
584
-
- SCL1
684
+
- SDA1 - also available on the camera connector.
685
+
- SCL1 - also available on the camera connector.
585
686
- SDA2 - D9
586
687
- SCL2 - D8
587
688
588
689

589
690
590
691
To connect I2C devices you will need to include the [Wire](https://www.arduino.cc/reference/en/language/functions/communication/wire/) library at the top of your sketch.
692
+
591
693
```arduino
592
694
#include <Wire.h>
593
695
```
594
696
595
-
Inside `void setup()` you need to initialize the library.
697
+
Inside `void setup()` you need to initialize the library, and initialize the I2C port you want to use.
698
+
596
699
```arduino
597
-
Wire.begin()
700
+
Wire.begin() //SDA & SDL
701
+
Wire1.begin(); //SDA1 & SDL1
702
+
Wire2.begin(); //SDA2 & SDL2
598
703
```
599
704
600
705
And to write something to a device connected via I2C, we can use the following commands:
706
+
601
707
```arduino
602
708
Wire.beginTransmission(1); //begin transmit to device 1
603
709
Wire.write(byte(0x00)); //send instruction byte
@@ -610,6 +716,7 @@ If you pay close attention you may notice that there are three sets of I2C pins.
610
716
If you want to use the third set (SDA2, SCL2) as I2C pins you will need to use external pullup resistors.
611
717
612
718
## Serial/UART Pins
719
+
613
720
The **GIGA R1** supports, like every other Arduino board, serial communication with UART (Universal Asynchronous, Receiver-Transmitter). However, the **GIGA R1** board features 4 separate serial ports.
614
721
615
722
This not only means that you may print different values to different ports and monitor them separately, which is useful enough in and of itself, but that you may also communicate with **4 different serial enabled devices** simultaneously.
@@ -626,6 +733,7 @@ The pins used for UART on the **GIGA R1** are the following:
626
733
- TX3 - 14
627
734
628
735
Each Serial port works in the same way as the one you're used to, but you use different functions to target them:
736
+
629
737
```arduino
630
738
Serial.begin(9600);
631
739
Serial1.begin(9600);
@@ -761,20 +869,24 @@ If you just need a quick overview of the pins functionality, this is a full tabl
761
869
### Analog Pins
762
870
763
871
The **GIGA R1** has 12 analog input pins that can be read with a resolution of 16 Bits, by using the `analogRead()` function.
872
+
764
873
```arduino
765
874
value = analogRead(pin, value);
766
875
```
767
876
768
877
The reference voltage of these pins is 3.3V.
769
878
770
-
Pins A8, A9, A10 and A11 can not be used as GPIO, but are limited to use as analog input pins.
879
+
Pins A8, A9, A10 and A11 can not be used as GPIOs, but are limited to use as analog input pins.
880
+
881
+
***For more advanced analog readings, you can use the `AdvancedAnalogRedux` library. Read more about this in the [Advanced ADC section](/tutorials/giga-r1/giga-audio#analog-to-digital-converters).***
771
882
772
883
773
884
### PWM Pins
774
885
775
886
PWM (Pulse Width Modulation) capability allows a digital pin to emulate analog output by flickering on and off very fast letting you, among other things, dim LEDs connected to digital pins.
776
887
777
888
The **GIGA R1** has 12 PWM capable pins, the PWM capable pins are 2-12. You may use them as analog output pins with the function:
889
+
778
890
```arduino
779
891
analogWrite(pin, value);
780
892
```
@@ -798,7 +910,7 @@ The **GIGA R1** features more pins than any other Arduino board for makers, a fu
798
910
- 18 - TX1
799
911
- 19 - RX1
800
912
- 20 - SDA
801
-
- 21 - SCL
913
+
- 21 - SCL
802
914
803
915
The reference voltage of all digital pins is 3.3V.
804
916
@@ -814,10 +926,13 @@ analogWrite(pin, value);
814
926
These DAC pins have a default write resolution of 8-bits. This means that values that are written to the pin should be between 0-255.
815
927
816
928
However you may change this write resolution if you need to, to up to 12-bits:
929
+
817
930
```arduino
818
931
analogWriteResolution(12);
819
932
```
820
933
934
+
***For advanced usage of the DAC, you can use the `AdvancedAnalogRedux` library. Read more about this in the [Advanced DAC section](/tutorials/giga-r1/giga-audio#digital-to-analog-converters).***
935
+
821
936
### OFF Pin
822
937
823
938
On the **GIGA R1** you will find a pin labelled **"OFF"**. If you connect this pin to ground, the board will power down even if power is supplied to the board.
0 commit comments