This is a small tutorial on how to debug a ROS2 C++ node usign VSCode.
This implementation was done using:
[sskw]$ npm run build | |
> stack-chan@0.2.1 build /work/ghq/github.com/meganetaaan/stack-chan/firmware | |
> cross-env npm_config_target?=esp32/m5stack cross-env-shell mcconfig -d -m -p \$npm_config_target -t build ./stackchan/manifest_local.json | |
/home/sskw/.local/share/esp32/esp-idf/tools/idf.py | |
/home/sskw/.local/share/moddable/build/tmp/esp32/m5stack/debug/stackchan/makefile:2109: 警告: ターゲット '/home/sskw/.local/share/moddable/build/tmp/esp32/m5stack/debug/stackchan/ftimage.h.xsi' のためのレシピを置き換えます | |
/home/sskw/.local/share/moddable/build/tmp/esp32/m5stack/debug/stackchan/makefile:2040: 警告: ターゲット '/home/sskw/.local/share/moddable/build/tmp/esp32/m5stack/debug/stackchan/ftimage.h.xsi' のための古いレシピは無視されます | |
# xsc pins/digital.xsb | |
# xsc ili9341.xsb |
import BLEServer from "bleserver"; | |
import Timer from "timer"; | |
let count = 0; | |
class Advertiser extends BLEServer { | |
onReady() { | |
} | |
onConnected(connection) { | |
this.stopAdvertising(); | |
} |
import { Outline } from "commodetto/outline"; | |
const useBlink = (openMin, openMax, closeMin, closeMax) => { | |
let eyeOpen = 1 | |
let nextToggle = randomBetween(openMin, openMax) | |
return (tickMillis) => { | |
nextToggle -= tickMillis | |
if (nextToggle < 0) { | |
eyeOpen = Number(!eyeOpen) | |
nextToggle = eyeOpen ? randomBetween(openMin, openMax) : randomBetween(closeMin, closeMax) |
/** | |
https://cloud.google.com/text-to-speech/docs/create-audio-text-client-libraries#client-libraries-usage-nodejs | |
### USAGE | |
* [Setup your googleplatform project](https://cloud.google.com/text-to-speech/docs/before-you-begin) | |
and download a service account json key. | |
* run below. | |
``` |
diff --git a/build/devices/esp32/targets/m5stack_core2/setup-target.js b/build/devices/esp32/targets/m5stack_core2/setup-target.js | |
index 443db0c6..72d58b2b 100644 | |
--- a/build/devices/esp32/targets/m5stack_core2/setup-target.js | |
+++ b/build/devices/esp32/targets/m5stack_core2/setup-target.js | |
@@ -68,65 +68,69 @@ export default function (done) { | |
} | |
// accelerometer and gyrometer | |
- state.accelerometerGyro = new MPU6886(INTERNAL_I2C); | |
+ try { |
import { Camera } from "@mediapipe/camera_utils"; | |
import { Holistic, Results } from "@mediapipe/holistic"; | |
import { Ref, useCallback, useState } from "react"; | |
export default function useMediaPipe(): [ | |
Ref<HTMLVideoElement>, | |
Results | null | |
] { | |
const [results, setResults] = useState<Results | null>(null); | |
const ref = useCallback(async (videoElement: HTMLVideoElement | null) => { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> |
unitv2% pwd | |
/home/m5stack/payload | |
unitv2% sudo env LD_LIBRARY_PATH=/home/m5stack/payload/opencv4/lib:$LD_LIBRARY_PATH python server.py | |
Password: | |
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used | |
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used | |
server_core.py:3: DeprecationWarning: The import 'werkzeug.secure_filename' is deprecated and will be removed in Werkzeug 1.0. Use 'from werkzeug.utils import secure_filename' instead. | |
from werkzeug import secure_filename | |
rm: can't remove './uploads/temp/*': No such file or directory | |
1970-01-01 05:28:50,264 - [line:795] - INFO: Server PID = 2763, Core PID = 2764 |