Add Esp32-Wifi library to PlatformIO - visual-studio-code

Hello i can't find out how i can add the Esp32 Wifi Library (https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi) to my PlatformIO Project (VS-Code). How am I able to add and import it?
I tried to copy it into the libs folder, and add the link to lib_deps
And Stackoverflow just says this Problem is not described good enough... Sorry for the lines at the end

You don't need to explicitly add the Wifi library. It's part of the ESP32 Arduino Core support.
You do need a correctly written platformio.ini file for that to work. That file would look something like this:
[env: esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
lib_deps = ...
Where you would replace esp32dev with the correct name for the board you're using.
If you don't have framework set to arduino, PlatformIO won't load the Arduino Core and you won't have the wifi library available.

Related

OTA LTE main.py update for GPy

In my internet research I often found how to update a main.py or the firmware with LoRa but with never how I can update my GPy with LTE.
In my thoughts I would do something like firstly in the boot.py setup the LTE and let it subscribe of MQTT where the new version of the program is. Then the GPy should start the update with the new file and get a new main.py.
Is this even possible or can I only update the main.py with LoRa? Next to this how could a code look like? I have to say I am quite new to the pycom and never used one before. What I can is simple micropython stuff for esp32.
Another person asked the same question like me but didnt get any helpful answer. Link to the question: OTA on Pycom gPy
Thank you for helping.

How would I go about writing code that uses android.hardware.automotive.vehicle#2.0 Library?

I'm trying to learn to write Hardware Abstraction Layer (HAL).
Here's the path I've taken so far, please correct me if I'm off in any step.
Downloaded AOSP and built it successfully (86%)
Located Vehicle Hal Support Library
Located android.hardware.automotive.vehicle C++ code.
Things I've attempted after that the steps below without succeeding to get those above classes recognized.
Import android.hardware.automotive.vehicle classes in Android Studio for a typical Android App that targets 29 Api Level.
Adding meta tag of android.car app
Copy/Pasting all source code under AOSP /packages/services/Car/
Partially contemplated adding android.hardware.automotive.vehicle#2.0.so Library and trying to access it through JNI (Not so sure about this one).
Please orient me, I see some repositories on github not doing anything special and somehow they're able to import the package in a java class like this.
import android.hardware.automotive.vehicle.V2_0.VehicleHwKeyInputAction;
import android.hardware.automotive.vehicle.V2_0.VehiclePropValue;
import android.hardware.automotive.vehicle.V2_0.VehicleProperty;
import android.hardware.automotive.vehicle.V2_0.VehiclePropertyAccess;
Here
how on earth do they get access to those classes?
Thanks
Vehicle HAL is not meant to be accessed directly from apps. Car Service does that for you.
You have couple options depending on what you're actually trying to accomplish:
Learn to write HAL services - it's like writing a driver for a given hardware (in this case, something that provides car data to Car Service).
Learn to write HAL clients - try modifying EmbeddedKitchenSink app first. Please note you need to build it with AOSP and not in AmdroidStudio since this is a system app (and regular apps doesn't have access to the HAL)
Learn Vehicle APIs - that's what you need car lib for. Details on how to use it: https://stackoverflow.com/a/63321234/14759774

Is it OK for me to develop against UWP with JavaScript on Visual Studio 2017?

My company is using RPG Maker MV (based on JavaScript) and looking to port over to Xbox UWP. It's no longer supported in the latest version of Visual Studio.
Is there a workaround or should I abandon this and convert over to C#?
Sadly this has indeed been deprecated, but as a workaround you can use a WebView to host the game which is what I do with mine. You'll still have to deal with a few extra things if you want to use the Xbox storage functions (see here for my commentary on this) and you still need to implement sign-in (which I'm still working on) but once you add the WebView to your MainPage.xaml name it something like ContentViewport and (immediately following your login and file processing logic) add the following line of code:
ContentViewport.Source = new Uri("ms-appx-web:///index.html");
Or wherever your index.html is, so if you prefer assets over package root with the www folder copied in as a base, you can use the following:
ContentViewport.Source = new Uri("ms-appx-web:///assets/www/index.html");

Using Pyb-Library in WiPy

How do I use the pyb-library in WiPy? The documentation is incomplete. import pyb doesn't work. Also not from pyb import delay or something. Also machine hasn't delay in it. How do I use following code?
https://docs.micropython.org/en/latest/pyboard/library/pyb.html#pyb.delay
easiest way to put a delay in micropython is
import time
time.sleep(Nseconds)
time.sleep_ms(N_milliseconds)
FYI:
pyb library is a module specific for pyboard, will not work in WiPy or ESP32 default micropython firmware. Basically the firmware for pyboard has a module called pyb along with other micropython standard modules. you could always add different modules and build a custom firmware and flash your WiPy.

Compiler error when using AlwaysRightInstitute/SwiftSockets

I'm try to write a small game on IOS using socket and I've had a java socket server running with Flash client, but I got complier errors when I add the AlwaysRightInstitute/SwiftSockets source code to my swift project, and I did nothing after doing this
Here is the project structure:
the selected group "ARISockets" is the source code I drag into my project
and here are the errors(Use of unresolved identifier 'ari_fcntIVi'):
It seems that the errors cause by lack of some import file and I found "ari_fcntIVi" in ARISockets/UnixBridge.c,but I'm a really newer to Swift/Objective-C/C (I'm a AS3 developer), so that sucks me :/
I had the same problem with this library.
You need to create a Bridge file similar to "Import Objective-C into Swift" but this is C:
How to call Objective-C code from Swift
The issue was that you just copied over the sources instead of embedding the SwiftSockets framework. The ari_ prefixed functions used to required the bridging header of the SwiftSockets framework.
Having said that, the current SwiftSockets doesn't use bridging headers anymore, and you can directly embed the sources.