element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Programmable Logic
  • Challenges & Projects
  • Project14
  • Programmable Logic
  • More
  • Cancel
Programmable Logic
Blog Display for Traffic Predictor - Cypress PSoC6 BLE Pioneer kit
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Programmable Logic requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dixonselvan
  • Date Created: 15 Jul 2019 3:55 PM Date Created
  • Views 1046 views
  • Likes 5 likes
  • Comments 4 comments
  • programmablelogicch
Related
Recommended

Display for Traffic Predictor - Cypress PSoC6 BLE Pioneer kit

dixonselvan
dixonselvan
15 Jul 2019

Introduction

 

     'Programmable Logic' Project14 competition has given Element14 Community members (and myself) a chance to explore 'Programmable Logic' which is usually not explored by hobbyists or makers in the first place. This may be due to the code or hardware complexity. But recently FPGAs and other PLDs have been made easy for beginners to learn and explore. One best example to quote would be Arduino Vidor 4000. So checking my inventory, I have the below four boards/ kits that would suit this competition's topic,

  1. Matrix Creator with FPGA - Xilinx Spartan 6 XC6SLX4 [SERA - Smart Extension Relay with Alexa - powered by MATRIX Creator and Arduino MKR1000]
  2. Digilent Arty S7 with FPGA - Xilinx Spartan 7 XC7S50-CSGA324 [Digilent ARTY S7 Dev Board (Xilinx Spartan 7) - Review] and
  3. Cypress PSoC6 BLE Pioneer Kit and WiFi-BT Pioneer Kit with PSoC6 [Cypress PSoCRegistered 6 BLE Pioneer Kit (CY8CKIT-062-BLE) - Review & PSoCRegistered 6 WiFi-BT Pioneer Kit (CY8CKIT-062-WIFI-BT) - Review]

 

     Out of these four, this blog will cover a simple project done using the Cypress PSoC6 BLE Pioneer kit. This project may not use the full (programmable) capacity of the PSoC6 rather uses a single programmable GPIO.

 

Display for Traffic Predictor

 

     Earlier, I had prototyped a traffic predictor system for the IoT on Wheels Design Challenge. This did not have a display unit rather had an Android mobile application to have the details displayed to the user. Hence I wanted to make a display for my traffic predictor project using the E-Ink Display shield of the Cypress PSoC6 BLE Pioneer kit. Though initially, I had many plans running through my mind, time constraint, unforeseen incident (Breakage of the E-Ink Display Shield) and the fact that I am new to Cypress PSoC family and PSoC Creator, limited the display functionalities to

  • Display the logo initially,
  • Display an alert in case any vehicle in front approaches closer than a limit and
  • Display the real-time temperature of the surrounding.

 

     The display unit would be an extension of the main traffic predictor system (Arduino UNO (replacing ST-Nucleo L476RG board), Ultrasonic Sensor and Servo Motor). Arduino Uno will send a HIGH or a LOW digital signal to the Cypress PSoC6 BLE Pioneer board, instructing when to display the alert in the E-Ink Display Shield and to turn ON/OFF the LED.

 

Read GPIO Pin and Set LED

     The GPIO pin used is F5, port P11[0]. You can find it as 11.0 in the Cypress PSoC6 BLE Pioneer board. The Red LED used is pin E3, port P0[3]. You can find this as P0.3 which the RGB LED on the board.

 

Code

 

volatile uint32_t pinReadValue = 0ul;
pinReadValue = Cy_GPIO_Read(DIN_PORT, DIN_0_NUM);


if(1u == pinReadValue)
{
    Cy_GPIO_Set(RED_Alert_0_PORT, RED_Alert_0_NUM); 
}
else
{
    Cy_GPIO_Clr(RED_Alert_0_PORT, RED_Alert_0_NUM);
}

 

     You can also use the below line to write a GPIO Pin

Cy_GPIO_Write(RED_Alert_0_PORT, RED_Alert_0_NUM, pinReadValue);

 

Schematic

image

imageimage

 

E-Ink Display Shield

     The E-Ink Display shield display images from an array of raw data of the image as below.

 

cy_eink_image_t logo[CY_EINK_IMAGE_SIZE] = 
{
/*Your Array contents from Output Image Raw Data goes here like below
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, // 1
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, // 2
*/
};

 

     This can be obtained using the PDI application from Pervasive displays by clicking here. Step by Step instruction for the same is given in the screenshot below. The content below the 'Output Image Raw Data' is the array data of the image required to display the image in the E-Ink Display Shield.

 

image

     Declare the image variable as an extern in the header file, to use it anywhere in your project.

extern cy_eink_image_t logo[CY_EINK_IMAGE_SIZE];

 

     You can display your image  using the below code snippets

//Method 1 - Display image in full screen
Cy_EINK_ShowFrame(currentFrame, logo, CY_EINK_FULL_2STAGE,
  CY_EINK_POWER_AUTO);


//Method 2 - Display image from the co-ordinates you define 
uint8 const  fullFrameCoordinates[] =   {0, 33, 0, 175};


Cy_EINK_ImageToFrameBuffer(frameBuffer[currentFrameBuffer],
                           (uint8*)background,
                           (uint8*)fullFrameCoordinates);

 

Demo Video of the project

     The below video is the demo of the display unit made for my traffic predictor project.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • DAB
    DAB over 5 years ago +1
    Nice post. I am not sure you are going to get enough warning with the ultrasonic detector to help you much. DAB
  • three-phase
    three-phase over 5 years ago +1
    Nice little update to your traffic predictor dixonselvan , good luck with the future updates. Kind regards.
  • dixonselvan
    dixonselvan over 5 years ago in reply to three-phase +1
    Thanks three-phase
  • dixonselvan
    dixonselvan over 5 years ago in reply to three-phase

    Thanks three-phase

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • three-phase
    three-phase over 5 years ago

    Nice little update to your traffic predictor dixonselvan, good luck with the future updates.

     

    Kind regards.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dixonselvan
    dixonselvan over 5 years ago in reply to DAB

    Thanks DAB Yes the ultrasonic is limited and this project needs an upgrade. I am planning to use cameras like those in autonomous cars. Will continue that as part 2 of this project when I find time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 5 years ago

    Nice post.

     

    I am not sure you are going to get enough warning with the ultrasonic detector to help you much.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube