element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
Intel
  • Products
  • Manufacturers
  • Intel
  • More
  • Cancel
Intel
Blog CapperLabs Greenhouse Controller - Blog 3 - Intel Edison
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Intel to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rsc
  • Date Created: 13 Feb 2017 4:15 PM Date Created
  • Views 458 views
  • Likes 3 likes
  • Comments 0 comments
  • intel
  • greenhouse
  • edison
  • intel_project
Related
Recommended

CapperLabs Greenhouse Controller - Blog 3 - Intel Edison

rsc
rsc
13 Feb 2017
CapperLabs Greenhouse Controller Table of Contents
Blog 1 Introduction
Blog 2 System Components
Blog 3 Intel Edison
Blog 4 Grove-y
Blog 5 Round and Round
Blog 6 Automatic Vent

 

 

I've been trying out some code on the Intel Edison Arduino board with varying levels of success.

I'd like to be able to see the status of various controls and sensors locally, so I've been trying to interface to

a Sparkfun Nokia 6100 display.  None of the published libraries would work as found, but after a few hours of code mods,

I was able to get the interface going.

image

 

One of the code changes was the control pin definitions in SparkFunColorLCDShield.h:

#define LCD_PIN_RES    8  // D8

#define LCD_PIN_CS      9  // D9

#define LCD_PIN_DIO   11  // D11

#define LCD_PIN_SCK   13  // D13

There are also two macros for changing the pin states that don't work with the Edison board because they are defined by PORT and BIT locations :

// #define sbi(var, mask)   ((var) |= (uint8_t)(1 << mask))

// #define cbi(var, mask)   ((var) &= (uint8_t)~(1 << mask))

These lines were commented out.

The rest of the code issues were with SparkFunColorLCDShield.cpp:

The original code sets pin direction (Input/Output) using DDRB, DDRC commands which don't work with the Edison.

Those lines needed to be changed to use the pinMode() command.

pinMode(LCD_PIN_RES, OUTPUT);

pinMode(LCD_PIN_CS, OUTPUT);

pinMode(LCD_PIN_DIO, OUTPUT);

pinMode(LCD_PIN_SCK, OUTPUT);

All the sbi() and cbi() calls needed to be changed to:

digitalWrite(LCD_PIN_XXX, HIGH); //for sbi()

digitalWrite(LCD_PIN_XXX, LOW);  //for cbi()

After these changes, the example would compile and run.

image

  • Sign in to reply
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