RPi GPIO Programming Using Arduino Web IDE

RPi GPIO Programming Using Arduino Web IDE © Apache-2.0

Arduino recently launched support for programming ARM-based SBCs using the Arduino web editor, and Raspberry Pi is one of those SBCs.

  • 2,866 views
  • 1 comment
  • 9 respects

Components and supplies

Apps and online services

About this project

Recently, Arduino launched support for programming ARM-based SBCs using the Arduino web editor and Raspberry Pi is one of the SBCs on the list. This video is all about the basic setup to get started with the programming of the Raspberry Pi GPIOs using Arduino codes. The setup is pretty simple and will help you if you are more comfortable in the Arduino ecosystem as compared to python. More in-depth functionalities are yet to be checked.

The pin/GPIO mapping or the numbering convention used by Arduino to address each GPIO pins is straightforward and it uses the actual pin position in the header of the Raspberry Pi. Obviously, pins used for power and GND can’t be used as GPIO but still, those pin numbers are not used for other GPIOs. Pin# defines the PIN number as used by Arduino.

Code

#include <SoftwareSerial.h>
// SoftwareSerial mySerial(16, 15);
int led=18;
void setup() {
  Serial.begin(9600);
  for(int i=0;i<40;i++)
    pinMode(i, OUTPUT);
  Serial.println("Strating the application.");
}
void loop() {
  //Serial.println("Hello");
  for(int i=1;i<14;i++){
    digitalWrite(i, HIGH);
    delay(1000);
    digitalWrite(i, LOW);
    delay(1000);
  }
}

Video

Code

Code snippet #1Plain text
#include <SoftwareSerial.h>
// SoftwareSerial mySerial(16, 15);
int led=18;
void setup() {
  Serial.begin(9600);
  for(int i=0;i<40;i++)
    pinMode(i, OUTPUT);
  Serial.println("Strating the application.");
}

void loop() {
  //Serial.println("Hello");
  for(int i=1;i<14;i++){
    digitalWrite(i, HIGH);
    delay(1000);
    digitalWrite(i, LOW);
    delay(1000);
  }
}

Comments

Similar projects you might like

Plugin Blockly@rduino for Arduino IDE

by Team LibrEduc

  • 13,802 views
  • 3 comments
  • 28 respects

Programming ATmega8 Using Arduino IDE

Project tutorial by Hami Mahdavinataj

  • 258 views
  • 0 comments
  • 2 respects

Programming ATtiny13 with Arduino Uno

by Tauno Erik

  • 10,924 views
  • 7 comments
  • 20 respects
Add projectSign up / Login