# Adding Arduino r4 wifi to Firmata board.h file

**URL:** <https://forum.arduino.cc/t/adding-arduino-r4-wifi-to-firmata-board-h-file/1247689>\
**Category:** UNO R4 WiFi\
**Created:** [April 14, 2024, 6:35pm UTC](https://forum.arduino.cc/t/adding-arduino-r4-wifi-to-firmata-board-h-file/1247689 "2024-04-14T18:35:56Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![matthewcern](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@matthewcern](https://forum.arduino.cc/u/matthewcern)\
**Post date:** [June 1, 2024, 11:26pm UTC](https://forum.arduino.cc/t/adding-arduino-r4-wifi-to-firmata-board-h-file/1247689/7 "2024-06-01T23:26:25Z")

</div>

open the board.h file from format with a code editor like visual studio code. Then navigate to the board.h file and copy and paste this

#elif defined(ARDUINO\_UNOWIFIR4)  
#define TOTAL\_ANALOG\_PINS 6  
#define TOTAL\_PINS 20 // 14 digital + 6 analog  
#define VERSION\_BLINK\_PIN 13 // or any available pin for LED  
#define IS\_PIN\_DIGITAL(p) ((p) \>= 0 && (p) \<= 13) // Adjusted for digital pins  
#define IS\_PIN\_ANALOG(p) ((p) \>= 14 && (p) \<= 19) // Adjusted for analog pins  
#define IS\_PIN\_PWM(p) (((p) == 3) || ((p) \>= 5 && (p) \<= 9) || ((p) \>= 10 && (p) \<= 13)) // Adjusted for PWM pins  
#define IS\_PIN\_SERVO(p) (((p) == 3) || ((p) \>= 5 && (p) \<= 9) || ((p) \>= 10 && (p) \<= 13)) // Adjusted for servo pins  
#define IS\_PIN\_I2C(p) ((p) == 18 || (p) == 19) // Adjusted for I2C pins  
#define IS\_PIN\_SPI(p) ((p) == SS || (p) == MOSI || (p) == MISO || (p) == SCK) // Adjusted for SPI pins  
#define PIN\_TO\_DIGITAL(p) (p) // Adjusted for digital pins  
#define PIN\_TO\_ANALOG(p) ((p)-14) // Adjusted for analog pins  
#define PIN\_TO\_PWM(p) PIN\_TO\_DIGITAL(p) // Adjusted for PWM pins  
#define PIN\_TO\_SERVO(p) PIN\_TO\_DIGITAL(p)

---

_[View the full topic](https://forum.arduino.cc/t/adding-arduino-r4-wifi-to-firmata-board-h-file/1247689)._
