[{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/448/original/IMG_20241209_193131_106.jpg?1733773528","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eA quick AI prompt here, dab of logging there, a blob of solder or two, followed by the realisation that the colour coded wires aren't coded...and hey presto, a joystick with twist and button to switch mode (driving forklift versus mast tilt/height control) or long press for the lights.\u003c/p\u003e\n\u003cp\u003eDisplay shows axis and mode, twist controls speed of motion/action, and serial prints too.\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eNext I'll add the connection to the forklift's remote interface (websocket), and possibly scraping the values from the input boxes on the human interface (web page).\u003c/p\u003e\n\u003cp\u003eI'd like it to be a bit more generic as to how the controller is configured for a target, but also avoid reinventing the wheel, so currently as a single use project it'll be hacky-as-can-be.\u003c/p\u003e\n\u003cp\u003eFor now here's the basic code, adapt to your leisure.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eCode:\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003e\u003ca href=\"https://github.com/tyeth/circuitpython-joystick-D400B-MK4/\" target=\"_blank\"\u003ehttps://github.com/tyeth/circuitpython-joystick-D400B-MK4/\u003c/a\u003e\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/tyeth/circuitpython-joystick-D400B-MK4/blob/main/code.py"},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eParts:\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://www.aliexpress.com/item/1005003970393584.html\" class=\"parts-name\" target=\"_blank\"\u003eJH-D400B-MK4 Joystick\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003e3DoF + Button, 10k analog potentiometers (5K also available)\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://www.aliexpress.com/item/1005003970393584.html\" class=\"parts-url btn-secondary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"JH-D400B-MK4 Joystick","url":"https://www.aliexpress.com/item/1005003970393584.html","description":"3DoF + Button, 10k analog potentiometers (5K also available)","quantity":"1"}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/446/original/51nsbYB9I9L._AC_SL1500_-2377319733.jpg?1733770225","metadata":{"caption":""}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://www.aliexpress.com/item/1005007063525130.html\" class=\"parts-name\" target=\"_blank\"\u003eM3 + M2.5 size Nuts + Bolts (Countersunk?)\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eProbably 12mm including bolt head, 2 of each size\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://www.aliexpress.com/item/1005007063525130.html\" class=\"parts-url btn-secondary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"M3 + M2.5 size Nuts + Bolts (Countersunk?)","url":"https://www.aliexpress.com/item/1005007063525130.html","description":"Probably 12mm including bolt head, 2 of each size","quantity":"1"}},{"element_type":"product","content":"https://www.adafruit.com/product/5691","metadata":{}},{"element_type":"text","content":"\n        \u003cp\u003eAnd some kind of battery power (or use USB and stop worrying so much)\u003c/p\u003e\n      ","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/1578","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003e3D Modelling / Enclosure\u003c/h2\u003e\n\u003cp\u003eThis uses 6mm double wall cardboard, as I had an excess from some recent deliveries. The design can be adapted, just update the plate_thickness variable in the onshape cad model. To examine the design you'll want to roll back to before the laser joint cutting steps, then roll to end again:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/447/original/Screenshot_2024-12-09_193446.png?1733772991","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eLaser Cutting svg:\u003c/p\u003e\n\u003cp\u003eGet from the Drawing Laser Sheet tab in onshape, or use this 6mm thickness file:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u003ca href=\"https://gist.github.com/tyeth/1bf8f39579c9bcbae84be4c8045f4bef\" target=\"_blank\"\u003ehttps://gist.github.com/tyeth/1bf8f39579c9bcbae84be4c8045f4bef\u003c/a\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://gist.github.com/tyeth/1bf8f39579c9bcbae84be4c8045f4bef"}]