Setting up VS Code to work with A-Star modules - visual-studio-code

I am trying to set up vs code currently to work with my a-star 3.3V module. I have code already working that I have uploaded successfully on the Arduino IDE, but I run into an error (see below). I have done some googling and wasn’t able to find a solution that worked, as most of them involved ensuring the board and ports were configured correctly, but I have already done that (to the best of my knowledge).
[Error] Uploading sketch ‘tuya-a-star.ino’: Exit with code=1
I have included some of the different things below so you can see what I mean, I am hoping I have missed something small here. The correct board and version is also selected as is the correct port. I have also selected the Arduino type for the C/C++ configuration.
arduino.json file
{
“configuration”: “version=8mhz”,
“board”: “pololu-a-star:avr:a-star328PB”,
“output”: “…/ArduinoOutput”,
“programmer”: “pololu-a-star:stk500for328PB”,
“sketch”: “tuya-a-star.ino”,
“port”: “COM4”
}

Related

How can I view the machine code in Netbeans (or other ide)?

I can't find where to view the machine code anywhere from googling (the solutions I tried were either outdated or didn't work: it's not listed under Window or going through Debugging for me). I'm supposed to look at it and compare it to the source code that generated it for an assignment. I'm fine with using another ide or something else besides netbeans, I just need to see machine code based on my source code.

stm32H474I cannot debug

I just got a STM32H747I-DISCO board. When I try to debug it and load the code to it by using its internal ST-Link and STM32Cube IDE. It says :
Break at address "0xa05f0000" with no debug information available, or outside of program code.
And when there comes a little option( View Disassembly) that leads me to some assembly code. How can I fix it? I am just trying to make simple led blinking. To be honest I have no idea how to use this board. This is my first time with it, maybe I am trying to write codes to the wrong core? Or maybe the problem is in the debug properties. I am stuck with it. How can I fix it?
Edit: Okay so I have figured out that it also gives "Program received signal SIGTRAP, Trace/breakpoint trap." error. I believe that is related to GBD but ı don't know how to work with GBD in STM32.
You seem to be making some very trivial error in your code. Since this is led blinking, I am assuming you must have either missed out on some library import or forgot to have provided clock to the I/O ports.
Also, do set up the mode to PULLUP if you are just doing LED blinking.
The above is pure speculation since I haven't seen your code yet.

Unity machine learning using internal brain for pre-trained networks results in crash

I try to get the machine learning project of Unity running. The project can be found here: https://github.com/Unity-Technologies/ml-agents
Following all the necessary steps to set everything up, everything works fine until I try to use a pre-trained model in an internal brain, e.g in the 3D-Ball example. On pressing play in the editor, it says to have stopped working and the editor crashes. Same goes for a successfully compiled executable.
Since I can't find any crash logs, I absolutely don't know what's the cause to this. Anybody had the same issue and solved it, or any ideas on this?
I'll just add the steps I made to set my project up, in case somebody wants to reproduce or check for mistakes I made:
Download zipped project from github
Open project with Unity 2018.1.1f1
Add ENABLE_TENSORFLOW to predefined symbols
Download and install TensorflowSharp Plugin
In the 3DBall Scene select the brain and switch BrainType to Internal
Run in editor or compile and run, results both times in a crash
EDIT
What's making me wonder is that I got it working just fine training an external brain in python using a compiled executable. So my thoughts were it should be much more easy to just forward pass a trained net, if it's working doing forward pass and back propagation. But it says though that external brain still is experimental, so not sure if that just will not work until some future patches.
EDIT 2
So I tried using an internal brain in an older version of the githubs project, which then worked quite fine. Also I used an older version of the TensforflowSharp Plugin. I'll try to figure out, which version still works and gonna post my results here ;)
To conclude, the problem was actually the recent version of the TensorflowSharp Plugin. Using an older version, which I found somewhere worked fine. I don't have the link to that version anymore, but in case someone experiences the exact same problem, I could search for it or upload it somewhere.

Flash not running debugger any more. Possible socket issue in Windows-10?

Bounty Update
I am leaving the question essentially the same, but I just want to point out at the beginning here that I'm most interested in help trying to get the socket between flash (Adobe Animate) and the native debugger working again, as I believe that is the issue I'm having. Or is it a socket between flash and Windows?
Original Question
I've apparently turned something off? Even when I write really bad code (like trying to call a function that isn't there or divide an integer into a fraction), the flash player boots, shows a background color and stops there. No messages in the output window or compiler errors window. If I fix my code, it all runs fine, but for about 30 minutes (ever since I started trying to work with bitmaps for a sprite sheet) I get no runtime errors no matter what kind of mistake I type in my code. Anyone know how to turn it back on?
I've checked my actionscript settings and I have both warning mode and strict mode checked on.
Could it be a socket issue? I admit I have little to no experience working with sockets and only a surface understanding of what that even means. I've added the socket tag. If someone can see that this is clearly nothing to do with sockets, by all means, I'll remove the tag.
UPDATE: 6/22/16
I just reinstalled Adobe Animate CC 2015.2 and no change. I'll try compiling it in flash builder when I get a chance to help pigeon hole the problem. (Edit 6/24: flash builder worked! But my trial version expired the next day so is no longer a viable option).
And I just tried something in the command prompt in Windows 10 as an administrator:
netsh winsock reset catalog
netsh int ip reset reset.log hit
which I found another user on flashdevelop.org used to fix a similar issue, but no change.
And I just tried debugging in Flash Builder. It worked fine (debugger caught bugs) but my trial version expired the next day.
update 6/24
I've tried launching debugger for AIR from within the Adobe Animate CC IDE and it works fine if there are no bugs; it fails to do anything visible (no Iphone emulator, no swf window) if I put a typo or error in the code.
I also just deleted winsock and winsock2, rebooted Windows, then reinstalled winsock and winsock2. No change.
update 6/25
Just tried a system restore in Windows to set all my files and settings and drivers etc. to the way it was a week and a half ago... Also completely uninstalled all Adobe products and reinstalled. No change. I can only imagine that wiping my hard drive and reinstalling Windows would do the trick, but come on, it hasn't come to that has it?
As VC.One suggested, I checked the compile error window (cannot believe I didn't check before! Maybe when I checked before there were no compile errors... Only runtime errors?) and the errors are showing up there. Does this mean that it's catching compile errors but just not runtime errors?
When you force/test a runtime error... make sure you check
Compiler Errors (ALT+F2) and also Output (F2). By Output I mean the window that shows traces (and runtime issues). One of those two should have some feedback for you.
A possible solution is to save a new Workspace. So with those windows for Compiler Errors and Output both open (or tabbed, I tab them next to my Timeline) go to Window (in top options like File/Edit/Debug etc) and choose Workspace, then into that you choose New Workspace. Give it a name in the pop-up and okay everything.
Flash should always load that current workspace (next time, go to Workspace option again, check that your specified workspace [by name] has a tick next to it...).
Possible pitfalls:
1 - Use the debug player
2 - Make sure there isn't somewhere a try/catch enclosing the portion of code that triggers the event that may lead to an error
3 - Socket issue: may be exported in debug mode but swf cannot connect to debugger (it waits in a blank state for 60 seconds I guess)
4 - Does it compile ok? If there are compilation errors you may get an SWF anyway but then it will not start
...

Command line arguments for Scratch 1.4

I'm using Scratch 1.4 for preparing a course for children.
The course is about controlling real devices (self built traffic lights, modified toys having motors, sensors, etc.)
For interfacing the hardware I'm using the Remote Sensor Protocol and the control-lines of a RS232 interface (3-in/3-out, all digital).
Everything works great, except small inconveniences:
The children have to do many steps manually:
start scratch first,
load a template project which enables remote sensor protocol and defines variables
accept the warning message notifying, that remote sensor protocol is enabled
start RSP-RS232 proxy
I'd like to simplify it by starting scratch from my tool, ask Scratch to perform steps 2,3 by command-line arguments and finally connect to the RSP port.
Is it possible?
If not, is it hard to implement these parameters in Smalltalk for someone with no Smalltalk experience (but other languages like C++)?
Thank you!
Ok, after some readings I could answer my question.
Bad news is: there is obviously no command line argument in Scratch passing a project-file as a start-project.
However good news is, it is not difficult to change the scratch for own needs. Several projects do it, e.g.:
Scratch 4 Arduino
Scratch GPIO
How to do it is described here:
http://wiki.scratch.mit.edu/wiki/Scratch_1.4_Source_Code
Scratch and Squeak
...
To get started, first copy the Scratch application ("Scratch.exe" or
"Scratch.app") from your normal Scratch folder into the Scratch source
code folder. (The Scratch application is actually just a Squeak
virtual machine, so any recent Squeak virtual machine should also
work.) Also, put copy of the Squeak source code file in that folder if
needed (this file is included in the zip file starting with the 1.4
source release). Finally, drop the file "ScratchSourceCode1.4.image"
onto the Scratch application. The Squeak programming environment will
start up, allowing you to view and modify the Scratch source code.
I was able to disable the dialogue notifying that remote sensors protocol is enabled
and to enable remote sensors at start by default. Took me 2 hours.
P.S.:
For those interested, I host my project here: https://github.com/vheinitz/Qratzfest
As I've found out, my Idea was not new (I've looked for this possibility about 3 years ago, but there was nothing). What is different, the proxy-tool is for PC, and is intended to use any hardware, not dedicated only to a specially firmwared Arduino or PI. Currently only control-pins of a serial interface are supported and linked to fixed names.
Soon it will provide the possibility to map any pin to any Scratch-variable.