8bitdo Pro 2 controller functional using Win10 UTIMATE but loses some triggers in RPi - joystick

I have built a basic working robotic car using a “8bitdo Pro 2” controller & Raspberry Pi 4 microcomputer. Connecting the controller by USB cable to Windows 10 & the ULTIMATE setup program, everything works OK. Now, transfer controller using Bluetooth to the RPi & setup with “approxeng” utilities. Using “approxeng_input_show_controls” shows that the trigger Lt inputs as L2 & analogue data, however Rt does not give any input. Reverting to ULTIMATE & swopping triggers gives the same result but using the right trigger! There seem to be three parts involved, a) Setup via ULTIMATE, b) Setup using the “approxeng” suite of utilities & c) controller code definitions listed in the Python program. I can provide the “8bitdo Pro 2” definition list in “8bitdo_pro_2_v1118_p736.yaml” & the controller class declaration of button codes used by the python program, if this helps for comparison. Has anyone got a list of ALL button codes & how to enable analogue input from trig

Related

Intel Advisor - view results from Linux cloud on local Windows GUI

With Intel Advisor, I ran the following on Linux in the cloud and downloaded the result folders to my local WIndows machine:
advixe-cl --collect=survey ./My_Program.exe
advixe-cl --collect=map ./My_Program .exe
advixe-cl --collect=dependencies ./My_Program .exe
Then I opened my Windows GUI for Advisor. I clicked the "Open Result" icon and opened the advixeproj file. It correctly shows sub-folders for survey, map and dependencies. When I open any of them, all I see in each of the window panes is:
No Data
To collect data about your application's performance, compile your application in Release Build settings and run Survey analysis.
My application is a C program (My_Program.exe) that calls a shared object written in assembly language (NASM). I assume Advisor can work with assembly language programs and shared objects because VTune does, so I don't think that's the problem.
Next to the Application field I click "Browse" and browse to the My_Program.exe, but Advisor says the file "is not an executable binary." Maybe that's because this is Windows and the binary is for Linux.
My question is: how do I view results from a Linux cloud server downloaded to my local Windows machine for analysis with the Windows GUI? I do that regularly with VTune without any problems.
Thanks.
In short - the method described in the question is generally correct, but for Advisor it is also important to specify --project-dir (keep it the same accross all analysis types).
1) [on linux] advixe-cl --collect=survey --project-dir ./my_project_dir ./My_Program.exe
2) [on linux] advixe-cl --collect=tripcounts --project-dir ./my_project_dir ./My_Program.exe
etc..
3) copy my_project_dir folder from Linux to Windows
4) [on windows in Advisor GUI or with advixe-gui - open] ./my_project_dir and use "Show My Result" button.
This is covered on Intel forum too, as noted in "comments" to the original question.
In addition There are 2 other different methods : using --snapshot command or just exchaning interactive HTML GUIs (available for Roofline and Offload features). They are described at e.g. given nice article: https://software.intel.com/content/www/us/en/develop/documentation/advisor-cookbook/top/analyze-performance-remotely-and-visualize-results-on-macos.html

Running structured text files in Raspberry pi 3

I have my raspberry pi3 and I did a small basic code in a text editor in structured text language. I don't know how to run the code in the terminal. I'm running OPEN PLC in raspberry pi. So there should be some way to run the structured text language code within the terminal.
Any suggestions would be helpful.
I have saved the file in .st extention which seems to be the extension for the structured text file. When I type the filename.st in a terminal, it says command cannot be executed.
The error message when I try to run the code, it says command cannot be executed. I would like to know how to compile and run the file ( in .st Extention) in the terminal.
None of the controllers ever run ST code directly. Before it gets to the plc it is compiled at least to С or even Machine code. So you cannot run your ST file directly. The only ways are.
You can use logi.CAD3. There is instruction on how to install RT on pi. In this case, you can use PI like a PLC and logi.CAD3 like IDE where you can write ST program.
Use CoDeSys. ерун have PI runtime too. But it cost money per license. Install it and Codesys will be IDE for PI.
Use OpenPLC Runtime and IDE. This will allow you to upload ST file on your PLC (Raspberry Pi)

What's the purpose of the key_mgmt attribute within wpa_supplicant? Does it need to be explicitly define?

I'm writing a bash script that is intended to update a Raspberry Pi's wifi settings contained with /etc/wpa_supplicant/wpa_supplicant.conf (running raspbian 9 stretch).
As per the official Raspberry Pi documentation, I am making use of the wpa_passphrase command, in which I can input the ESSID and password of my desired network and then append it's output onto the end of the existing /etc/wpa_supplicant/wpa_supplicant.conf file, before reloading the settings with wpa_cli -i wlan0 reconfigure.
This is all fine and dandy and works great, but I noticed that it doesn't produce any key_mgmt fields, unlike if you were to manually log into a network via the desktop GUI.
I'm just curious if there is any harm in not having that key_mgmt field explicitly defined? What is its use case, if networks can be connected to without trouble without it (at least in my cases). I read through the sparse documentation for wpa and wpa_supplicant, and it didn't tell me much.
For reference, the networks that I noticed would work with or without this field would have the key_mgmt=WPA-PSK if I logged in via the RPi's desktop GUI. All the networks I tested with had this in common.
Thanks in advance!

Why am I not able to write to/read from custom AXI lite peripheral's registers

I am working with a Zynq board where a custom AXI 4 lite slave peripheral is created and then added from the IP Repository. Then these blocks have been successfully connected with Run Connection Automation. Then bit stream was generated successfully.
Further the SDK was launched. There was a blank C project with simple code for the ZYNQ PS working already. This code was altered by following the pdf "Designing a custom AXI4 lite Slave Peripheral" (the one shown in the following image).
Write and read functions for the custom AXI slave peripheral
Now the SDK executes without any error but when I observe the addresses on SDK monitor, there is no data written into it (as shown in the following image).
Where could I have gone wrong or what have I missed?
Working with vhdl on Vivado 16.2.
What I have already tried: -processing with XSDB console with command
mwr -force 0x43C00000 0x01234
no change there.
Checked the Vivado Address editor to contain the same base address
included xparamters.h
Thank you very much in advance..
update: the xparameters.h file did not have the same base and high address as the vivado address editor. So tried with changing the 'memory region' in linker script to RAM from DDR enter image description here ,
now when observed in the 'variables' window, when clicked on 'Step Into' button, i do get the expected change in valuesenter image description here ..
The XSDB console output and Memory monitor output remain unchanged though.
The hardware platform specification file does show the custom AXI lite with the right expected base and high address.enter image description here
Hardware_platform specified
One of the reasons that were causing this problem was a different hardware platform associated with the debug configurations wrt to the one you want to use.
As we make some changes in the IPs and update them, when the bitstream is exported to SDK, a new hardware platform gets created . Say if the older one is TOP_WRAPPER_hw_platform_0, now a new one is created TOP_WRAPPER_hw_platform_1.
This new platform should be updated in the debug configuration settings Hardware platform.
further in debug config settings the following needed to be ticked on
Under Target Setup
Reset entire system
Program FPGA
Under Application tab
Download Application
Stop at 'main'

Using USB keyboard device to trigger terminal commands on raspberry pi

I have a small robot which runs on a raspberry pi.
I need to be able to control it with an RF remote to trigger a few different terminal commands which run short python scrips.
Previously I did this with a GUI on my macbook, triggering these commands over ssh, but I now need to be able to trigger them in the absence of an internet connection.
The remote I bought is:
https://www.adafruit.com/products/3092?gclid=CNPj7LjTgNECFdOPswodsiULYA
I realize that this is designed for OSMC.
This remote shows up as a USB keyboard on the Pi, which makes the challenge more general:
* - How could one rig a 'USB keyboard device' to trigger entire terminal commands with the click of one key?*
My low-level knowledge of hardware is limited, and my programming experience extends little beyond python.
Any direct solution or suggested reading is much appreciated.
I am also open to alternatives, however I do not have time to order new hardware online.
You could write a python script which uses the 'os' library to interact with the terminal, have it looking for certain keystrokes and then writing the relevant commands to the terminal via os.
e.g
if (KEY == "F"):
os.system("cd Dropbox")
I have no idea how to do formatting here, but you get the idea.

Resources