Luc Paquin
Published © CC BY

Project #30 - UNIHIKER - SC7A20 - Mk10

Project #30 - UNIHIKER - SC7A20 - Mk10

BeginnerFull instructions provided1 hour53
Project #30 - UNIHIKER - SC7A20 - Mk10

Things used in this project

Hardware components

DFRobot UNIHIKER K10
×1
DFRobot Lithium Ion Battery - 1000mAh
×1
SparkFun Switch
×1
DFRobot USB 3.1 Cable A to C
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Fritzing

Code

DL2504Mk05p.mp

Arduino
/****** Don Luc Electronics © ******
Software Version Information
Project #30 - UNIHIKER - SC7A20H - Mk10
DL2504Mk05p.mp
DL2504Mk05
1 x UNIHIKER K10
1 x Lithium Ion Battery - 1000mAh
1 x Switch
1 x USB 3.1 Cable A to C
*/

// Include the Library Code
// Unihiker K10
#include "unihiker_k10.h"
// Arduino Image Cache
#include "arduino_image_cache.h"

// Create an object
// UNIHIKER K10
UNIHIKER_K10 k10;
// Screen
uint8_t screen_dir=2;

// Software Version Information 30-09
// Main program start
void setup() {
	
  // Begin
  k10.begin();
  // Init Screen
  k10.initScreen(screen_dir);
  // Canvas
  k10.creatCanvas();

}
// Loop
void loop() {

  // Draw Bitmap
  k10.canvas->canvasDrawBitmap(0,0,240,320,image_data1);
  // Text Acceleration X
  k10.canvas->canvasText("Acceleration X", 6, 0x330000);
  // Acceleration X
  k10.canvas->canvasText((k10.getAccelerometerX()), 7, 0x0000FF);
  // Text Acceleration Y
  k10.canvas->canvasText("Acceleration Y", 8, 0x330000);
  // Acceleration Y
  k10.canvas->canvasText((k10.getAccelerometerY()), 9, 0x0000FF);
  // Text Acceleration Z
  k10.canvas->canvasText("Acceleration Z", 10, 0x330000);
  // Acceleration Z
  k10.canvas->canvasText((k10.getAccelerometerZ()), 11, 0x0000FF);
  // Update Canvas
  k10.canvas->updateCanvas();

}

Credits

Luc Paquin
34 projects • 3 followers
Teacher, Instructor, E-Mentor, R&D and Consulting -Programming Language -Microcontrollers -IoT -Robotics -Machine Learning -AI -Sensors
Contact

Comments

Please log in or sign up to comment.