0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WioLTE: Grove-LCD の使い方

Posted at

「GR0-3350 I2C電圧変換」を使います。

wiolte_i2c_aug30.jpg

プログラム

grove-lcd.ino
// ---------------------------------------------------------------
//	grove-lcd.ino
//
//						Aug/30/2024
// ---------------------------------------------------------------
#include <WioLTEforArduino.h>
#include <Wire.h>
#include "rgb_lcd.h"

WioLTE Wio;

rgb_lcd lcd;

const int colorR = 255;
const int colorG = 255;
const int colorB = 0;

// ---------------------------------------------------------------
void setup() {
	SerialUSB.println("### I/O Initialize.");
	Wio.Init();
  
	SerialUSB.println("### Power supply ON.");
	Wio.PowerSupplyGrove(true);
	delay(500);

	Wire.begin();

	delay(500);
	// set up the LCD's number of columns and rows:
	lcd.begin(16, 2);
	delay(500);

	lcd.setRGB(colorR, colorG, colorB);
	lcd.setCursor(0, 0);
	lcd.print("			   ");
	delay(500);
	// Print a message to the LCD.
	lcd.setCursor(0, 0);
	lcd.print("Good, Morning!");
  
	delay(500);
}

// ---------------------------------------------------------------
void loop() {
	int it = millis()/ 1000;
	lcd.setCursor(0, 1);
	lcd.print(it);
   
	SerialUSB.printf("LED Sample %d\n",it);
  
	lcd.setCursor(0, 0);
	lcd.print("Good, Afternoon!");
	delay(3000);
}

// ---------------------------------------------------------------

Arduino IDE

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?