When I execute test.py. It can run LED ON/OFF/PWM. But error appear when ket-in 'y' for BOARD INFORMATION. How to fix it?
`linaro@tinkerboard:~/gpio_lib_python/test$ python test.py
Ftest.py:620: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
GPIO.cleanup()
F..This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
.....
warnings.new gpio = 162
.....
warnings.direction == OUTPUTThis channel is already in use, continuing anyway.
.....
Use GPIO.setwarnings(False) to disable warnings.
PWM tests
Is the LED on (y/n) ? y
Is the LED off (y/n) ? y
LED Brighten/fade test...
Did it work (y/n) ? y
test.py:259: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
GPIO.cleanup()
.This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.event_detected() switch bounce test. Press switch at least 10 times and count...
new gpio = 163
Etest.py:379: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
GPIO.cleanup()
This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
Switch bounce test. Press switch at least 10 times and count...
new gpio = 163
E
RPi.GPIO version 0.1 - is this correct (y/n) ? n
FRPi Board Information
P1_REVISION => 3
RAM => 1024M
REVISION => 0000
TYPE => Tinker Board
PROCESSOR => ROCKCHIP3288
MANUFACTURER => ASUS
Is this board info correct (y/n) ? y
.
ERROR: testAddEventCallback (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 554, in testAddEventCallback
GPIO.add_event_detect(LOOP_IN, GPIO.FALLING)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testAlreadyAdded (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 466, in testAlreadyAdded
GPIO.add_event_detect(LOOP_IN, GPIO.RISING)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testAlternateWaitForEdge (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 605, in testAlternateWaitForEdge
GPIO.wait_for_edge(LOOP_IN, GPIO.RISING)
RuntimeError: Error waiting for edge
======================================================================
ERROR: testBothEventDetected (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 505, in testBothEventDetected
GPIO.add_event_detect(LOOP_IN, GPIO.BOTH)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testExceptionInCallback (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 540, in testExceptionInCallback
GPIO.add_event_detect(LOOP_IN, GPIO.RISING, callback=cb)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testFallingEventDetected (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 479, in testFallingEventDetected
GPIO.add_event_detect(LOOP_IN, GPIO.FALLING)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testInvalidBouncetime (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 460, in testInvalidBouncetime
GPIO.add_event_detect(LOOP_IN, GPIO.RISING, bouncetime=123)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testRisingEventDetected (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 492, in testRisingEventDetected
GPIO.add_event_detect(LOOP_IN, GPIO.RISING)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testWaitForEdgeInLoop (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 397, in testWaitForEdgeInLoop
GPIO.wait_for_edge(LOOP_IN, GPIO.FALLING)
RuntimeError: Error waiting for edge
======================================================================
ERROR: testWaitForEdgeWithCallback (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 412, in testWaitForEdgeWithCallback
GPIO.add_event_detect(LOOP_IN, GPIO.RISING)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: testWaitForEventSwitchbounce (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 448, in testWaitForEventSwitchbounce
GPIO.wait_for_edge(LOOP_IN, GPIO.RISING, bouncetime=100)
RuntimeError: Error waiting for edge
======================================================================
ERROR: testWaitForFalling (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 531, in testWaitForFalling
GPIO.wait_for_edge(LOOP_IN, GPIO.FALLING)
RuntimeError: Error waiting for edge
======================================================================
ERROR: testWaitForRising (main.TestEdgeDetection)
Traceback (most recent call last):
File "test.py", line 523, in testWaitForRising
GPIO.wait_for_edge(LOOP_IN, GPIO.RISING)
RuntimeError: Error waiting for edge
======================================================================
ERROR: test_alreadyinuse (main.TestSetWarnings)
Test 'already in use' warning
Traceback (most recent call last):
File "test.py", line 266, in test_alreadyinuse
with open('/sys/class/gpio/export','wb') as f:
IOError: [Errno 13] Permission denied: '/sys/class/gpio/export'
======================================================================
ERROR: test_event_detected (main.TestSwitchBounce)
Traceback (most recent call last):
File "test.py", line 371, in test_event_detected
GPIO.add_event_detect(SWITCH_PIN, GPIO.FALLING, bouncetime=200)
RuntimeError: Failed to add edge detection
======================================================================
ERROR: test_switchbounce (main.TestSwitchBounce)
Traceback (most recent call last):
File "test.py", line 362, in test_switchbounce
GPIO.add_event_detect(SWITCH_PIN, GPIO.FALLING, callback=self.cb, bouncetime=200)
RuntimeError: Failed to add edge detection
======================================================================
FAIL: runTest (main.TestAAASetup)
Traceback (most recent call last):
File "test.py", line 61, in runTest
self.assertEqual(str(e.exception), 'Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)')
AssertionError: 'Please set pin numbering mode using GPIO.setmode(GPIO.BOARD), GPIO.setmode(GPIO.ASUS), GPIO.setmode(GPIO.BCM) or GPIO.setmode(GPIO.RK)' != 'Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)'
======================================================================
FAIL: test_cleanall (main.TestCleanup)
Traceback (most recent call last):
File "test.py", line 622, in test_cleanall
self.assertEqual(GPIO.gpio_function(LOOP_OUT), GPIO.IN)
AssertionError: 1 != 0
======================================================================
FAIL: test_cleanupwarning (main.TestSetWarnings)
Test initial GPIO.cleanup() produces warning
Traceback (most recent call last):
File "test.py", line 310, in test_cleanupwarning
self.assertEqual(len(w),0) # no warnings
AssertionError: 1 != 0
======================================================================
FAIL: test_gpio_version (main.TestVersions)
Traceback (most recent call last):
File "test.py", line 325, in test_gpio_version
self.assertEqual(response, 'Y')
AssertionError: 'N' != 'Y'
Ran 32 tests in 290.548s
FAILED (failures=4, errors=16)
`