B4J Question Raspberry Pi simple led light up cannot work!

tzfpg

Active Member
Licensed User
Longtime User
I try to used jPi4J for simple led light up project but cannot work. Here is my coding
B4X:
'Non-UI application (console application)
#Region  Project Attributes
   #CommandLineArgs:
   #MergeLibraries: true
#End Region

Sub Process_Globals
   Private controller As GpioController
   Private Pin23 As GpioPinDigitalOutput
   'Private Timer1 As Timer
End Sub

Sub AppStart (Args() As String)
   controller.Initialize
   Pin23.Initialize(23, True) 'GpioPinDigitalOutput
   StartMessageLoop
End Sub

Suppose pin23 get the High value and the led light will turn on but it not.

I used python to write the small project and the light was turn on.

Here is the python code:
B4X:
import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
led=23
GPIO.setup(led,GPIO.OUT)
GPIO.output(led,1)

How to make b4j work?
 

tzfpg

Active Member
Licensed User
Longtime User
yes i'm running with B4J-Bridge, yes i have tested already. but still cannot light up.
 
Upvote 0

tzfpg

Active Member
Licensed User
Longtime User
Anyone please help me try my b4j source code, i need to know where the problem cause the led didn't light up.
 
Upvote 0
Top