3 * Very simple demonstration of the PiGlow board.
4 * This uses the SN3218 directly - soon there will be a new PiGlow
5 * devLib device which will handle the PiGlow board on a more easy
8 * Copyright (c) 2013 Gordon Henderson.
9 ***********************************************************************
10 * This file is part of wiringPi:
11 * https://projects.drogon.net/raspberry-pi/wiringpi/
13 * wiringPi is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU Lesser General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
18 * wiringPi is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License for more details.
23 * You should have received a copy of the GNU Lesser General Public License
24 * along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
25 ***********************************************************************
39 sn3218Setup (LED_BASE) ;
43 for (i = 0 ; i < 256 ; ++i)
44 for (j = 0 ; j < 18 ; ++j)
45 analogWrite (LED_BASE + j, i) ;
47 for (i = 255 ; i >= 0 ; --i)
48 for (j = 0 ; j < 18 ; ++j)
49 analogWrite (LED_BASE + j, i) ;