Getting wemos boards to comunicate.

I am trying to get my wemos board D1 R2 mini board (wifi compatable) to play sounds when I press a button, different types of sound (a C octave going from C D E F G A B C) I now know that you can’t do this on that board. I am now using a Wemos UNO board however I soon discovered I cant use my Expansion board tm1638- which has 8- LEDS on it a 7 -segment clock and 8 buttons nor my OLED Screen. So I have plugged in my Wemos D1 R2 (wifi compatable board). D1 purple cable has been plugged into the breadboard slot1, D2 yellow cable into breadboard number 2, D3 blue into BB (breadboard 3), D4 black into BB 4, D5 white into BB 5, D6 orange into BB 6, D7 green into BB 7, D8 brown into BB 8. i have then plugged in a blue cable from the GND into the breadboard and 3v3 red into breadboard. i have then connected each pin from the wemos uno into the breadboard matching the same 8 pins into the 8 pins of the wemos D1 R2 mini board. i have wrote code that hopefully should say if button 1-8 on the expansion tm1638 board is pressed it will set the voltage to high if not it will set the voltage to nothing. i then have another script that runs on the wemos uno board saying, if pin 1-8 = high play C D E F G A B C etc.

code for wemos D1 board

// OLed screen
#include <Streaming.h>
#include
// – OLED -------
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// OLED i2c
#define OLED_RESET -1
#define OLED_SCREEN_I2C_ADDRESS 0x3C
Adafruit_SSD1306 display(OLED_RESET);
// oled screen end

// starting buttons for 7 seg
#include <InvertedTM1638.h>
#include <TM1638.h>
#include <TM1638QYF.h>
#include <TM1640.h>
#include <TM16XX.h>
#include <TM16XXFonts.h>
byte buttons;
#define TM1638_STB D5
#define TM1638_CLK D6
#define TM1638_DIO D7
TM1638 module(TM1638_DIO, TM1638_CLK, TM1638_STB);
//ending buttons for 7 seg.

//Buttons config
// constants won’t change. They’re used here to set pin numbers:
const int buttonPin = 1;
const int ledPin = 1;
const int buttonPin2 = 2;
const int ledPin2 = 2;

// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
// End buttons config

void setup()
{
//screen setup
Serial.begin(115200);

// – OLED --------------
display.begin(SSD1306_SWITCHCAPVCC, OLED_SCREEN_I2C_ADDRESS);

display.display();
delay(2000);
display.clearDisplay();
display.setCursor(0, 0);
display.setTextSize(1); // - a line is 21 chars in this size
display.setTextColor(WHITE);
//ending screen setup

// set up the 7-segment display
module.clearDisplay();
module.setupDisplay(true, 2);

// Ending 7 segment setup

//Button setup

// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);

//End button setup
}

void loop()
{

//code for the screen
display.clearDisplay();
display.setCursor(0, 0);

display << “Each Button Will” << endl;
display << “Represent One Note” << endl;
display << “Pressing button 1-8” << endl;
display << “will Play a C Octive” << endl;

display.display();

// code for the screen

//Code for the buttons

// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(1, HIGH);
}
else
{
// turn LED off:
digitalWrite(1, LOW);
}

if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(2, HIGH);
}
else
{
// turn LED off:
digitalWrite(2, LOW);
}

if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(3, HIGH);
}
else
{
// turn LED off:
digitalWrite(3, LOW);
}
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(4, HIGH);
}
else
{
// turn LED off:
digitalWrite(4, LOW);
}
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(5, HIGH);
}
else
{
// turn LED off:
digitalWrite(5, LOW);
}
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(6, HIGH);
}
else
{
// turn LED off:
digitalWrite(6, LOW);
}
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(7, HIGH);
}
else
{
// turn LED off:
digitalWrite(7, LOW);
}
if (buttonState == HIGH)
{
// turn LED on:
digitalWrite(8, HIGH);
}
else
{
// turn LED off:
digitalWrite(8, LOW);
}
// End code for buttons.
}

// Code for wemos Uno board

#include <pitches.h>

#define NOTE_C4 262
#define NOTE_D4 294
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_G4 392
#define NOTE_A4 440
#define NOTE_B4 494
#define Note_C5 523

int pin = 1,2,3,4,5,6,7,8;
int contact = digitalRead(pin);

void setup()
{
pinMode(pin, INPUT);

}

void loop()
{
if (contact == HIGH)
{
tone(1, 262, 200);
delay(200);
}
else
{
noTone(1);
}

if (contact == HIGH)
{
tone(2, 294, 200);
delay(200);
}
else
{
noTone(2);
}

if (contact == HIGH)
{
tone(3, 330, 200);
delay(200);
}
else
{
noTone(3);
}

if (contact == HIGH)
{
tone(4, 349, 200);
delay(200);
}
else
{
noTone(4);
}

if (contact == HIGH)
{
tone(5, 392, 200);
delay(200);
}
else
{
noTone(5);
}

if (contact == HIGH)
{
tone(6, 440, 200);
delay(200);
}
else
{
noTone(6);
}

if (contact == HIGH)
{
tone(7, 494, 200);
delay(200);
}
else
{
noTone(7);
}

if (contact == HIGH)
{
tone(8, 523, 200);
delay(200);
}
else
{
noTone(8);
}

}

sometimes it does compile sometimes i do get a espcom upload failed message but when it does compile the oled screen works and displays my message, but it wont display the note when i press the buttons, im pretty sure ive coded it wrong but i dont know how to fix it if anyone can help that would be most helpful <3

Please do read the forum sticky, especially on how to post code.

Secondly, a WeMOS Uno may look exactly like an Arduino Uno, they are utterly incompatible. Voltage levels, pin numbers, even the sheer number of available pins... it's all different. Afaik they're not being produced because of the many problems they cuased.