Anon ymous
Published © MIT

Riverdi and XinaBox - Hello World

This project demonstrates the use of XinaBox xChips interfaced with a Riverdi display. A simple 'Hello World' is displayed on the screen.

BeginnerFull instructions provided12 minutes691
Riverdi and XinaBox - Hello World

Things used in this project

Hardware components

CW02
XinaBox CW02
Wi-Fi and Bluetooth Core based on the ESP32 Module.
×1
IP01
XinaBox IP01
The FT232R is a USB to serial UART interface device which is equipped to power and program other modules via a USB A connector. The IP01 is required for programming the range of CPU Core xChips over the USB-serial bridge provided by the FT232R.
×1
XC10
XinaBox XC10
xBus connectors allow various xChips to be interfaced to one another.
×2
XinaBox OD22
Output xChip capable of interfacing to a Riverdi capactive/resistive touch Display.
×1
Riverdi 4.3" Display
A 4.3" touch screen display
×1
Flat Flex Cable
20 Position FFC, FPC Cable 0.020" (0.50mm) 3.000" (76.20mm)
×1
5V USB Power source
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Hello World

C/C++
This code runs a a Hello World example.
/*****************************************************************************
* Copyright (c) Future Technology Devices International 2014
* propriety of Future Technology devices International.
*
* Software License Agreement
*
* This code is provided as an example only and is not guaranteed by FTDI. 
* FTDI accept no responsibility for any issues resulting from its use. 
* The developer of the final application incorporating any parts of this 
* sample project is responsible for ensuring its safe and correct operation 
* and for any consequences resulting from its use.
*****************************************************************************/
/**
* @file                           HelloWorld.ino
* @brief                          Sketch to display hello world on FT801.
								  Tested platform version: Arduino 1.0.4 and later
* @version                        0.1.0
* @date                           2014/17/05
*
*/


/* This application demonstrates the usage of FT801 library on VM801P43 platform */

/* Arduino standard includes */
#include "SPI.h"
#include "Wire.h"

/* Platform specific includes */
#include "FT_VM801P43_50.h"

/* Global object for FT801 Implementation */
FT801IMPL_SPI FTImpl(FT_CS_PIN,FT_PDN_PIN,FT_INT_PIN);

/* Api to bootup FT801, verify FT801 hardware and configure display/audio pins */
/* Returns 0 in case of success and 1 in case of failure */
int16_t BootupConfigure()
{
	uint32_t chipid = 0;
	FTImpl.Init(FT_DISPLAY_RESOLUTION,0);//configure the display to the WQVGA

	delay(20);//for safer side
	chipid = FTImpl.Read32(FT_ROM_CHIPID);
	
	/* Identify the chip */
	if(FT801_CHIPID != chipid)
	{
		Serial.print("Error in chip id read ");
		Serial.println(chipid,HEX);
		return 1;
	}
	
	/* Set the Display & audio pins */
	FTImpl.SetDisplayEnablePin(FT_DISPENABLE_PIN);
    FTImpl.SetAudioEnablePin(FT_AUDIOENABLE_PIN); 
	FTImpl.DisplayOn(); 	
	FTImpl.AudioOn();  		
	return 0;
}

/* API to display Hello World string on the screen */
void HelloWorld()
{
	/* Change the below string for experimentation */
	const char Display_string[12] = "Hello World";
	
	/* Display list to display "Hello World" at the centre of display area */
	FTImpl.DLStart();//start the display list. Note DLStart and DLEnd are helper apis, Cmd_DLStart() and Display() can also be utilized.
	FTImpl.ColorRGB(0xFF,0xFF,0xFF);//set the color of the string to while color
	FTImpl.Cmd_Text(FT_DISPLAYWIDTH/2, FT_DISPLAYHEIGHT/2, 29, FT_OPT_CENTER, Display_string);//display "Hello World at the center of the screen using inbuilt font handle 29 "
	FTImpl.DLEnd();//end the display list
	FTImpl.Finish();//render the display list and wait for the completion of the DL
}

/* bootup the module and display "Hello World" on screen */
void setup()
{
	/* Initialize serial print related functionality */
	Serial.begin(9600);
	
	/* Set the Display Enable pin*/   
	Serial.println("--Start Application--");
	if(BootupConfigure())
	{
		//error case - do not do any thing
	}
  	else
	{
		HelloWorld();
	}
	Serial.println("--End Application--");
}

/* Nothing in loop api */
void loop()
{
}

Credits

Anon ymous
10 projects • 2 followers
Contact

Comments

Please log in or sign up to comment.