Using the same PIN for input and output

Hello

I would use a single PIN for input and output.

I'm experimenting with writing a driver for the DHT11 that using a single interface

I have the following code to open the PIN, but it fails

GPIOPin dhtPin = (GPIOPin) DeviceManager.open (new GPIOPinConfig (0, 17, GPIOPinConfig.DIR_BOTH_INIT_INPUT, GPIOPinConfig.DEFAULT, GPIOPinConfig.TRIGGER_NONE, false));

VM - iso [DAAPI] =-1: not supported direction was placed for 17 GPIO pin number. Open failed

jdk.dio.InvalidDeviceConfigException

-com/oracle/deviceaccess/gpio/impl/GPIOPinImpl.openPinByConfig0 (), bci = 0

com/oracle/deviceaccess/gpio/impl/GPIOPinImpl. < init > (), bci = 87

-com/oracle/deviceaccess/gpio/impl/GPIOPinFactory.create (), bci = 6

-com/oracle/deviceaccess/gpio/impl/GPIOPinFactory.create (), bci = 3

-jdk/dio/DeviceManager.openWithConfig (), bci = 49

-jdk/dio/DeviceManager.open (), bci = 6

-jdk/dio/DeviceManager.open (), bci = 2

-dht11 / DHT11. < init > (DHT11.java:42)

-dht11 / DHT11. < init > (DHT11.java:37)

-dht11/DHT11Midlet.startApp(DHT11Midlet.java:25)

-javax/microedition/midlet/MIDletTunnelImpl.callStartApp (), bci = 1

-com/sun/midp/midlet/MIDletPeer.startApp (), bci = 5

-com/sun/midp/midlet/MIDletStateHandler.startSuite (), bci = 264

-com/sun/midp/main/AbstractMIDletSuiteLoader.startSuite (), bci = 38

-com/sun/midp/main/CldcMIDletSuiteLoader.startSuite (), bci = 5

-com/sun/midp/main/AbstractMIDletSuiteLoader.runMIDletSuite (), bci = 132

-com/sun/midp/main/AppIsolateMIDletSuiteLoader.main (), bci = 26

I have the following permissions value

jdk.dio.gpio.GPIOPinPermission "*: *" 'open, setdirection '.

jdk.dio.DeviceMgmtPermission "*: *" 'open '.

I tried a few other pins too, I don't know if some ankles are entered or only output pins.

Any help would be appreciated. I could not find documents explaining how to configure more than one action for a permission ( 'open, setdirection'), so I tried just until he stopped to complain about the values...

What I need is to open a PIN, set it OUT, write a few high and low values... set it to the direction of the ENTRANCE, and reading back high and low values... But right now my GPIOPinConfig seems to be problematic

(... Configuration of the meaning to DIR_INPUT_ONLY or DIR_OUTPUT_ONLY, works until I try to change the direction of the port - what is expected...)

Hi Charl-

As far as I KNOW, he is there no current plan to apply 1 thread in Java ME Embedded.

I also looked at Pi4Jand they do not also support 1-wire, however, there is an enhancement request to add support for the bit hit Linux driver will have to perform 1-wire work.

The raspberry pi support it, it's just Java ME holds back me.

BTW - the article has been referenced in the enhancement request notes that he is not taken in native support for 1 wire on the Raspberry Pi - it requires a Linux kernel driver module.

Tom

Tags: Java

Similar Questions

  • Can we use the same package for main and begotten of concurrent programs.

    Hello

    I use a package.procedure1 for a simultaneous program. Can I use the same package.procedure2 of a pondu simultaneous program which was called from package.procedure1? If I say incompatible as the same program of 1, which will create problems by running the 2nd program because the package is same?

    Thank you
    HC

    I use a package.procedure1 for a simultaneous program. Can I use the same package.procedure2 of a pondu simultaneous program which was called from package.procedure1?

    Yes you can.

    If I say incompatible as the same program of 1, which will create problems by running the 2nd program because the package is same?

    When you second the 2nd program it will not work if the 1st program execution, and he has to wait until you have completed the 1st program.

    Don't know what code you use in the first and second procedures or even in the whole, but you can try this in a TEST instance first and check whether or not it works as expected.

    Thank you
    Hussein

  • Try to use the same pattern for more than two channels (CSR configuration) with usb 6000

    Hello

    I am currently trying to implement a LabView code to get readings of voltage using 5 different places at the same time. I want to only use the first location in the ground and get 4 measurements of voltage between the ground and each of the other 4 channels. I use a USB 6000 which, for now, allows me to use the same pattern for only two channels. Is it possible to use the same pattern for 4 channels?

    Thank you

    Maria

    The images do not explain everything. You must explain what are the sensors. I think you totally wrong on how they should be linked. CSR, all sensors must be a common understanding and the outputs not individual channels as I have already explained. If you are unable to do this, you should probably not use CSR and you have the wrong data acquisition device. If you want a side of a sensor as a reference, you need differential connections.

  • How is it that a computer which works very well with a direct Ethernet connection won't work with a switch, however any other computer using the same port, cable, ect, and so on, can?

    Switch issues. Help, please.

    How is it that a computer which works very well with a direct Ethernet connection won't work with a switch, however any other computer using the same port, cable, ect, and so on, can? We already checked the firewall as a question, that it was not, and now, we are puzzled.

    Well, I know that the issue is long-term... believe me, it's a long, but as they say, the devil is in the details. Anywho, the question is, my grandfather has a HP laptop, which for two years has been able to run through a Linksys switch to his router and connect its printers to his laptop. About two months ago it suddenly doesn't work like that. Now, it works fine if it plugs directly into the router/Ethernet. My uncle suggested that the switch was bad, but after testing the same port, cable and all, the switch worked well for him. ' GRAMPS really needs this answered, but someone else, it is called can not understand and now I, in turn, ask you all for what you can offer. Here are the ideas that we have already discredited.

    -Switch bad: as above, is that this particular laptop, even under identical conditions, the works of my uncle very well.
    -Bad NIC: debunked through the fact we connected to the computer directly to the router and it worked fine.
    -Bad configuration of the firewall: we have disabled the firewall (please do not notice, he wasn't the smartest idea, we already know) and even if she recorded the switch exists, the internet is always triggered when you are connected with the switch.

    Thanks in advance for any assistance that you can provide and Merry Christmas to you all.

    It would be useful to consult the results of the ipconfig/all command both when it is connected to the switch and when it is connected directly to the router.  In addition, what is the model of the switch?

    To save the manual copy and the new hits of the ipconfig/all command output-

    First connect through switch.
    Open a command prompt window (start > run > cmd > OK)
    Type the following lines in the black command prompt window and press ENTER after each line

    echo "Connected via the button" > "% UserProfile%\Desktop\ipinfo.txt".
    ipconfig/all > "% UserProfile%\Desktop\ipinfo.txt".

    Now connect directly to the router, type the following lines in the command prompt window and press ENTER after each line

    echo "Connected to the router" > "% UserProfile%\Desktop\ipinfo.txt".
    ipconfig/all > "% UserProfile%\Desktop\ipinfo.txt".
    Notepad '% UserProfile%\Desktop\ipinfo.txt '.
    output

    Copy the contents of the Notepad window in your response (if you use the laptop when it is connected directly to the router) or close the Notepad window, and then copy ipinfo.txt of the laptop to the Gramps in a USB FlashDrive you can connect to any computer allows you to answer.

    You can delete ipinfo.txt on the desktop when you are finished.

  • Is it possible to use the same password for two computers through quickbooks?

    We have two computers that are connected to each other through quickbooks and we must be able to get our e-mails from computers. Is this possible? We need to send invoices to the customers of a computer and the other is used for accounting and payroll.

    Original title: you can use the same password for two computers if they are already linked through quickbooks?

    Hi JayneB,

     

    (1) are you referring to the password of the user account?
    (2) who is the operating system installed on the computer?

     

    Method-

    I would like you to contact the Quickbooks support for assistance.

    Check out the link-

     

    QuickBooks support

     

    Hope this helps!

     

  • Getting the error «for input and output sample rate does not match...» »

    I am trying to create an audio file, but when I click on the record button I get this error:

    «The sampling rate of the audio output devices and audio don't match.» Audio cannot be recorded until this problem is corrected.

    Use the appropriate operating system or control panel of audio device to adjust the sampling frequency of the output devices and audio entries to use the same settings. »

    I have the preferences set to use operating system controls and it seems to work because when I change in the Win 7 Pro CP it adjusts at the hearing.

    So I do not know which need to be addressed. I use the video card as the source and not the speakers thus mean the output must be la carte too?

    Please help, I'm confused.

    Thanks for your time!

    Got an answer to a previous question asking how to record and thought, this could be useful for others.

    rothmannnyc,

    February 18, 2013 16:33 in response to talbot

    It takes a Windows setting and a setting of the hearing.

    You will need to go into your settings from Windows recording devices - if you see a speaker in the lower right of your screen, right-click on it and choose recording devices.  Find your audio input source, select Properties, go to advanced.  You should see a drop down menu with options for the quality and frequency of sampling, mono/stereo.  In general, you'll want to 44.1 kHz for audio; 48 Hz for the video.

    At the hearing, go to Edition/Preferences/Audio Hardware and select the same frequency of sampling for output.  I went through the same question a few months ago, and it worked for me.  Good luck!

  • HP envy 14-2090eo: can I use the same drivers for windows 8 and 8.1

    When I check in drivers which operating systems there are drivers available for my Hp Envy 14-2090eo, it says Windows 8 (64-bit) and Windows 7 (64-bit), "and im currently using Windows 7 64 bit" but does that mean the drivers to support these 2 Windows 8 and 8.1 of Windows operating systems, said in a different way "» : are the same drivers for Windows 8 and Windows 8.1?

    Best regards from hpenvy1

    Hello:

    Your model has the AMD/Intel switchable graphics.

    It is unlikely that the W8 AMD graphics driver will work on W8.1.

    Normally, you can use some of the drivers W7/W8 on W8.1, but the graphics is very doubtful - not switchable graphics anyway.

    You can run the windows 8.1 upgrade wizard and see what it reports.

    http://Windows.Microsoft.com/en-us/Windows-8/Upgrade-Assistant-download-online-FAQ

  • Using the same interface CAN read and write

    Hello.

    Can I use the same CAN interface to read and write?

    For example:

    I send you CAN frame using CAN1 to my MCU.

    IF MCU confirmed the order of receiver it immediately sends the echo return command and there different ID to send the command.

    I tried to use CAN1 output framework and then reconfigures CAN1 to frame in queue and retrieve the frame of the echo.

    But it seems that I was always missing. The 'framework of CAN' kept vi expire.

    When I used the separator on the outlet BOX in my configured MCU CAN1 for frame and CAN2 for chassis in and I managed to catch the echo framework.

    I think about 100 ms for the frame in response that will be sent after the order has been received. It takes longer for the NI PXI-8513 reconfigure? Can I still do it, or I have to use the separator?

    I wad jump to use an interface to read and write.

    Thank you

    Ok. I misread your notion of echo. I understand now. I'm sorry.  The code you posted seems reasonable.

    (1) did you notice on or off for the session?

    (2) what baud rate? You can add a parameter of baud rates for the property to be explicit node.

    (3) I don't remember the name of VI, but you can add a status of Comm Get after reading. This will give you some information about the bus - if errors were detected, etc. Which can be useful to help debug.

  • If I use a web font in my Web site can I use the same font for documents printed such as company car

    I'm a graphic designer who intends to design a portfolio Web site in Adobe Muse. I intend to use TypeKit web fonts to design my Web site. On the Web site completioin, I have plan to design business cards and my CV to match the look of my site. I would use the same fonts I've used on the Web site. Is it possible to use web fonts for printing purposes? If this is not the case, what usually people do in this situation. The last thing I want to do is use a font that "similar" to those used on my site.

    Hi redsoxfan15b,

    (I think I can have answered your ticket of Support of Typekit earlier today, but I'll post here the same information to be certain).

    We have recently added a new feature to Typekit that can sync your desktop fonts and use them in print design. The announcement on our Web site has more details:

    http://blog.Typekit.com/2014/01/16/the-fonts-you-love-from-Typekit-now-on-your-desktop/

    Font sync is available on any portfolio Typekit, Performance or Business plan.  Here is a list of all available fonts to use the Office to:

    https://Typekit.com/fonts?licenses=desktop

    We continue to pay more of the library to use the desktop, but for now, you must confirm the police you want it available for both web and desktop.  And if there is a font you want to use is not available for desktop synchronization, you can also buy a license directly from the foundry.

    I hope this helps; Let me know if you have any other questions!  Best,

    -liz

  • Using the same links for other pages

    Hello everyone. If a Web site has been created in photoshop CS6 and sliced and now in Dreamweaver, is it possible to copy the links from the homepage to the rest of the site. Example: Welcome, words, products, contact us. Who are the main links on the home page, the rest of the site have the same words, so once the links have been created on the home page, is it possible to copy/past these links in other pages of the site, without having to redo all the links for each page.

    Thank you

    Why, Atl

    CS6

    Hello everyone. If a Web site has been created in photoshop CS6 and sliced and now in Dreamweaver

    The worst way possible to create a website - it is guaranteed to break unexpectedly.

    Study the use of the library for your main menu items. One item, a change-> each page...

  • How to use the same script for several buttons

    Hello

    I have just started using flash if any help would be great!

    I create a blockbuster game, I have a grid of 20 buttons and I need (individually) to turn blue on red and click double click. I managed to do it with the first using this code;

    --------------------------------------------

    var click: Boolean = false;

    BN1.addEventListener (MouseEvent.CLICK, bn1click);

    function bn1click(event:MouseEvent):void {}

    clicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0 x 064258;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    /////////////

    BN1.doubleClickEnabled = true;

    var doubleclicked:Boolean = false;

    BN1.addEventListener (MouseEvent.DOUBLE_CLICK, bn1dclick);

    function bn1dclick(event:MouseEvent):void {}

    DoubleClicked = true;

    var newColorTransform:ColorTransform = bn1.transform.colorTransform;

    {if (clicked)}

    newColorTransform.color = 0xac1e23;

    }

    BN1. Transform.ColorTransform = newColorTransform;

    }

    --------------------------------------------

    Now, I'll have trouble doing the same thing to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and stay blue/red when clicked. I tried to list them as addEventListener orders but not with not a lot of success!

    Any help would be greatly appreciated, thank you!

    Tomo

    To do this is to use arrays to follow the buttons and their properties.

    var buttonList:Array = new Array (bn1, bn2, bn3);

    var clickedList:Array = new Array();

    var doubleClickedList:Array = new Array();

    Then use a loop for to assign functions and properties for each button:

    var thisMany:int = buttonList.length; This will give you the number of items in the buttonList array

    for (var i: int = 0; i

    buttonList [i] .addEventListener (MouseEvent.CLICK, btnClick); assign the function click on each button

    buttonList [i] .addEventListener (MouseEvent.DOUBLE_CLICK, btnDClick); assign the double-click function

    clickedList.push (false);  Add a value of false for each key in this table

    doubleClickedList.push (false);

    buttonList [i] .doubleClickEnabled = true; Set the property of double-tap for each button

    }

    function btnClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);  know which button has been clicked as an element in the table

    clickedList [Ceboutonselectionnel] = true;  Change the value in the table

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (clickedList [thisButton])}

    newColorTransform.color = 0 x 064258;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    function btnDClick(event:MouseEvent):void {}

    var thisButton:int = buttonList.indexOf (event.target);

    doubleClickedList [Ceboutonselectionnel] = true;

    var newColorTransform:ColorTransform is buttonList [Ceboutonselectionnel].transform.colorTransform;.

    {if (doubleClickedList [thisButton])}

    newColorTransform.color = 0xac1e23;

    }

    buttonList [Ceboutonselectionnel].transform.colorTransform = newColorTransform;

    }

    Now you can have any number of buttons, just add their instance names in the table above.

  • How can I synchronize catalogs on 2 computers that use the same location for the image files?

    I do not understand Lightroom.

    For example, I use LR4.2 on a desktop computer and a laptop computer. Two computers (Windows 7 64-bit) go to the same image files. On my laptop in a folder, I have 42 master images and 5 virtual (virtual events) for a total of 47 images. But when I open LR4.2 on the desktop I do not see the 5 virtual (virtual events) on the 42 master images.

    Why can not I see the 5 virtual events since I can access the exact file and how I see the virtual evidence created on the laptop on the desk.

    It has no function in LR to synchronize catalogs.

    If your pictures are on an external hard drive, you can move the file catalog to this external hard drive, and then you will have a catalogue on your desk and another on the laptop. Just use the one on your external hard drive.

    If your pictures are on a network drive, you can not put the file catalog here, so the only answer I know is to manually transfer the catalog back from one computer to the other file.

    Why can I not see the 5 virtual events since I can access the correct folder

    Lightroom does not save your work to the photo files. It stores your work in the Lightroom catalog file.

  • By using the same class for movieclips duplicate

    Hi all

    I created an external a particular movieclip class and I would like to bind a version duplicated this MovieClip in the same class file.

    Problem is that I can't seem to do. Even if I declare the class as a BASE of the new movieclip class and create another name of the random class for it.

    Is there a way I can get around this so I can give my clip duplicated the same class name?

    Thanks in advance

    Martin

    use:

    package {}
       
    import flash.display.MovieClip;
       
    SerializableAttribute public class Animal1 extends Animal {}
           
    public void Animal1 (): void {}
               
    Super (frameNumber, level);
               
    }
    }
    }

    you will then get errors telling you of frameNumber and level are not defined.  fix this.

  • can not developed my e-mail, been using the same password for the past 13 years?

    I'D LIKE AN ANSWER TO MY PROBLEM, ALL WHAT I GET IS A LOT OF NOTHING TO HELP WITH MY PROBLEM.  I HAD INTERNET THEN THE TECHNICIAN CHANGED FOR GOOGLE CHROME AND I DON'T LIKE IT, ID PREFER TO HAVE INTERNET, CAN YOU HELP, ITS BEEN TWO DAYS AND NO EMAIL?

    Type Internet Explorer in the "Search" box and press ENTER.

    You will probably be asked if you want to make the default. Answer 'yes '.

    If not, go to tools > Internet Options, click on the "Programs" tab, click on 'Use default', click on 'OK '.

  • I can no longer print Quicken reports using the same program for the past five years

    I have used Quicken for years (same version of Quicken and Windows 7 and has never had a year problem print end reports so far.)  Why

    You must support Quicken community.

Maybe you are looking for