{"id":845,"date":"2021-04-02T13:19:49","date_gmt":"2021-04-02T05:19:49","guid":{"rendered":"http:\/\/bversion.com\/WordPress\/?p=845"},"modified":"2021-04-03T10:12:42","modified_gmt":"2021-04-03T02:12:42","slug":"lego-mindstorm-znap-with-ps4-controller","status":"publish","type":"post","link":"https:\/\/bversion.com\/WordPress\/2021\/04\/02\/lego-mindstorm-znap-with-ps4-controller\/","title":{"rendered":"LEGO MindStorms \u2013 Znap with PS4 controller"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"LEGO Mindstorms Znap with PS4 Controller\" width=\"604\" height=\"340\" src=\"https:\/\/www.youtube.com\/embed\/XfvU_EaLMkE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>This is an extended project of <a rel=\"noreferrer noopener\" href=\"http:\/\/bversion.com\/WordPress\/2021\/03\/14\/lego-mindstorm-znap-with-a-remote-control\/\" target=\"_blank\">LEGO MindStorms \u2013 Znap with a remote controller<\/a>, please refer it for the Dog movement and communication between EV3 Bricks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux  \/dev\/input\/event*<\/h2>\n\n\n\n<p>Thanks for <a rel=\"noreferrer noopener\" href=\"https:\/\/antonsmindstorms.com\/2020\/02\/14\/how-to-connect-a-ps4-dualshock-4-controller-to-your-mindstorms-ev3-brick-with-bluetooth\/\" target=\"_blank\">Anton&#8217;s Mindstorms Hacks<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/python-evdev.readthedocs.io\/en\/latest\/index.html\" target=\"_blank\">evdev<\/a> and <a rel=\"noreferrer noopener\" href=\"https:\/\/www.kernel.org\/doc\/Documentation\/input\/input.txt\" target=\"_blank\">Linux Input drivers v1.0 (c) 1999-2001 Vojtech Pavlik<\/a>, they gave us good idea how Linux deal with inputs.<\/p>\n\n\n\n<p>Since ev3dev is Linux based, when PS4 controller connected to the EV3 Brick via Bluetooth, we can identify the handler from a directory call \/dev\/input. As shown below, event2, event3 and event4 are created when the PS4 controller is connected.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"81\" src=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-8.png\" alt=\"\" class=\"wp-image-869\" srcset=\"https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-8.png 398w, https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-8-300x61.png 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/a><\/figure>\n\n\n\n<p>When we looked into the device detail from \/proc\/bus\/input\/devices, we can get the following details,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"663\" height=\"937\" src=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-10.png\" alt=\"\" class=\"wp-image-871\" srcset=\"https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-10.png 663w, https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-10-212x300.png 212w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Handler Event 0 = Input0 &#8211; LEGO Mindstorms EV3 Speaker<\/li><li>Handler Event 1 = Input1 &#8211; EV3 Brick Buttons<\/li><li>Handler Event 2 = Input2 &#8211; Wireless Controller Touchpad<\/li><li>Handler Event 3 = Input3 &#8211; Wireless Controller Motion Sensors<\/li><li>Handler Event 4 = Input4 &#8211; Wireless Controller<\/li><\/ul>\n\n\n\n<p>We are going to use the Wireless Controller to control the Dog, event4 is the target handler to get all inputs information.  Based on the information we reviewed, we learnt that event4 contains 16 bytes of data as shown below,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"172\" src=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-12.png\" alt=\"\" class=\"wp-image-887\" srcset=\"https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-12.png 1016w, https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-12-300x51.png 300w, https:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/image-12-768x130.png 768w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>tv_sec (long unsigned value) : Time in seconds since epoch at which event occurred.<\/li><li>tv_usec (long unsigned value) : Microsecond portion of the timestamp.<\/li><li>ev_type (unsigned short) : Event type<\/li><li>code (unsigned short) : Event code<\/li><li>value (signed long) : Event value<\/li><\/ul>\n\n\n\n<p>We are using ev_type, code and value to monitor the PS4 controller inputs. It updates real time for any <strong>status change<\/strong>, such as button press, button release, joystick movement. <strong>Keep in mind<\/strong>, if a button is being held, it will generate a value &#8216;1&#8217; for once but no additional update until the button is released, then a value &#8216;0&#8217; will be generated. <\/p>\n\n\n\n[This part was created by Adam]\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab, .wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab[data-kb-block=\"kb-adv-heading_ac3418-ab\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab[data-kb-block=\"kb-adv-heading_ac3418-ab\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_ac3418-ab[data-kb-block=\"kb-adv-heading_ac3418-ab\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading_ac3418-ab wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_ac3418-ab\">PS4 Controller mapping with EV3DEV<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Open the PS4 Controller file at \/dev\/input\/event4 in binary mode\ninfile_path = \"\/dev\/input\/event4\"\nin_file = open(infile_path, \"rb\")\n\n# Format of the event contains - unsigned long int, unsigned long int, \n# unsigned short, unsigned short, signed int, i.e. LLHHi\nFORMAT = 'LLHHi' \nEVENT_SIZE = struct.calcsize(FORMAT)\n.\n.\n.\n# Read from the file and unpack into five variable based on the format\nevent = in_file.read(EVENT_SIZE)\n(tv_sec, tv_usec, ev_type, code, value) = struct.unpack(FORMAT, event)\n<\/pre>\n\n\n\n<p>This part is to open the file event4 to import the PS4 Controller values into 5 variables based on the predefined format &#8211; &#8216;LLHHi&#8217;.  We use ev_type, code and value to identify the action from PS4 Controller.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ev_type : There are two main type, type 1 = buttons, type 3 = joystick, dpad and analog trigger<\/li><li>code : Which button or joystick being pressed \/ moved<\/li><li>value : The action done, button pressed = 1, released = 0, or analog value from joystick and analog trigger<\/li><\/ul>\n\n\n\n<p>So, we wrote a small program to identify each codes and values from the PS4 Controller. The result is shown below,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Key mapping as shown below\n\nType = 1, code &amp; possible value\n\nL1 - 310 (0,1)\nL2 - 312 (0,1)\nL3 - 317 (0,1)\nR1 - 311 (0,1)\nR2 - 313 (0,1)\nR3 - 318 (0,1)\nTriangle - 307 (0,1)\nSquare - 308 (0,1)\nCross - 304 (0,1)\nCircle - 305 (0,1)\nShare - 314 (0,1)\nOption - 315 (0,1)\nPS - 316 (0,1)\n\nType = 3, code &amp; possible value\n\nLeft Stick Y - 1 (Up 0 - Down 255)\nLeft Stick X - 0 (Left 0 - Right 255)\nRight Stick Y - 4 (Up 0 - Down 255)\nRight Stick X - 3 (Left 0 - Right 255)\nL2 - 2 (0 - 255)\nR2 - 5 (0 - 255)\ndpad Up &amp; Down - 17 (-1, 0, 1)\ndpad Left &amp; Right- 16 (-1, 0, 1)<\/pre>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4, .wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4[data-kb-block=\"kb-adv-heading_326ce7-d4\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4[data-kb-block=\"kb-adv-heading_326ce7-d4\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_326ce7-d4[data-kb-block=\"kb-adv-heading_326ce7-d4\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading_326ce7-d4 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_326ce7-d4\">How does the program work<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def PS4_Controller():\n    global pressed\n    global trigger_dog\n    global speed\n    global speed_backwards\n    global speed_forwards\n    global turning\n    global out\n\n    while True:        \n        # Read from the file and unpack into five variable based on the format\n        event = in_file.read(EVENT_SIZE)\n        (tv_sec, tv_usec, ev_type, code, value) = struct.unpack(FORMAT, event)\n                    \n        if ev_type == 1 and code == 311 and value == 1: \n            trigger_dog =  45                  \n            out = 1\n        if ev_type == 1 and code == 311 and value == 0:\n            trigger_dog = 0        \n            out = 0\n\n        if ev_type == 1 and code == 310 and value == 1 and out == 0:\n            trigger_dog =  35\n\n        if ev_type == 1 and code == 310 and value == 0 and out == 0:\n            trigger_dog =  0\n                \n        if ev_type == 1 and code == 305 and value == 1:\n            pressed = True\n            \n        if ev_type == 1 and code == 305 and value == 0:\n            pressed = False\n                    \n        if ev_type == 3 and code == 5:\n            speed_forwards = value * 6\n        \n        elif ev_type == 3 and code == 2:\n            speed_backwards = value * -6\n\n        if ev_type == 3 and code == 0:\n            turning = (value*360-(180*255))\/255\n\nPS4_Controller_Thread = threading.Thread(target = PS4_Controller)\nPS4_Controller_Thread.setDaemon = True\nPS4_Controller_Thread.start()\n        \nbite = 0\nwhile True:\n\n    speed = speed_forwards + speed_backwards    \n    print(speed)\n    combo(pressed)\n    forward(speed,turning)\n    bite = Dog_bite(trigger_dog, bite)\n    \nin_file.close()<\/pre>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8, .wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8[data-kb-block=\"kb-adv-heading_6d4017-c8\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8[data-kb-block=\"kb-adv-heading_6d4017-c8\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_6d4017-c8[data-kb-block=\"kb-adv-heading_6d4017-c8\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading_6d4017-c8 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_6d4017-c8\">Basic Idea<\/h3>\n\n\n\n<p>Since we didn&#8217;t want to change the program of &#8216;the Dog&#8217;, we replaced the LEGO Controller part, i.e. receiving LEGO Controller result, with a new function to detect the action from the PS4 Controller buttons and joysticks. When corresponding action done on the PS4 Controller, the function will update the variable for &#8216;the Dog&#8217; to action. <\/p>\n\n\n\n<p>For example, when we press the circle, the function will detect a value of ev_type = 1 , code = 305 and value = 1. Then, it changes the variable &#8216;Pressed &#8216; to True so that &#8216;the Dog&#8217; will do combo. If we keep pressing the button, the variable &#8216;Pressed&#8217; will stay True until we released the button.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca, .wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca[data-kb-block=\"kb-adv-heading_d0eb76-ca\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca[data-kb-block=\"kb-adv-heading_d0eb76-ca\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_d0eb76-ca[data-kb-block=\"kb-adv-heading_d0eb76-ca\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading_d0eb76-ca wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_d0eb76-ca\">Parallel Processing<\/h3>\n\n\n\n<p>We made the function parallel processing because it can detect all the status changes from the PS4 Controller. If we use normal function, the function will only read the latest actions from the controller that may result missing some of the actions. Especially, if we want to detect button pressed or released. <\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92, .wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92[data-kb-block=\"kb-adv-heading_c3a265-92\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92[data-kb-block=\"kb-adv-heading_c3a265-92\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_c3a265-92[data-kb-block=\"kb-adv-heading_c3a265-92\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h3 class=\"kt-adv-heading_c3a265-92 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_c3a265-92\">Global Variable<\/h3>\n\n\n\n<p>When we use global variable, the variable change by the parallel progressing function can be read by the program outside. For the PS4_Controller function detects any actions from the controller, it will change the corresponding variable for &#8216;the Dog&#8217; to respond, just like the LEGO Controller sending message to &#8216;the Dog&#8217;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build instruction and the program<\/h2>\n\n\n\n<p>We created the program from scratch without referring any example, you can download from below.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/04\/LEGO-Znap-with-PS4-Controller.7z\">LEGO-Znap-with-PS4-Controller<\/a><\/div>\n\n\n\n<p>Official Build Instruction from LEGO<\/p>\n\n\n\n<p><a href=\"http:\/\/bversion.com\/WordPress\/wp-content\/uploads\/2021\/03\/ev3-model-expansion-set-znap.pdf\">The Dog<\/a><\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24, .wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24[data-kb-block=\"kb-adv-heading_763dc2-24\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24[data-kb-block=\"kb-adv-heading_763dc2-24\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_763dc2-24[data-kb-block=\"kb-adv-heading_763dc2-24\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading_763dc2-24 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_763dc2-24\">What\u2019s next?<\/h2>\n\n\n\n<p>It may be fun if you use PS4 to control the <a rel=\"noreferrer noopener\" href=\"http:\/\/bversion.com\/WordPress\/2021\/02\/03\/lego-mindstorm-elephant\/\" target=\"_blank\">LEGO Elephant<\/a>, <a rel=\"noreferrer noopener\" href=\"http:\/\/bversion.com\/WordPress\/2020\/12\/24\/lego-mindstorm-r3ptar-with-potato\/\" target=\"_blank\">Snake<\/a> and even with the <a href=\"http:\/\/bversion.com\/WordPress\/2021\/02\/18\/lego-mindstorm-stair-climber\/\" target=\"_blank\" rel=\"noreferrer noopener\">Stair Climber<\/a>!!<\/p>\n\n\n\n<p>Moreover, you may try to learn more about event2 &amp; event3 for how to use the controller touchpad and the motion sensor.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is an extended project of LEGO MindStorms \u2013 Znap with a remote controller, please refer it for the Dog movement and communication between EV3 Bricks. Linux \/dev\/input\/event* Thanks for Anton&#8217;s Mindstorms Hacks, evdev and Linux Input drivers v1.0 (c) 1999-2001 Vojtech Pavlik, they gave us good idea how Linux deal with inputs. Since ev3dev &hellip; <a href=\"https:\/\/bversion.com\/WordPress\/2021\/04\/02\/lego-mindstorm-znap-with-ps4-controller\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">LEGO MindStorms \u2013 Znap with PS4 controller<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":934,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"yes","footnotes":""},"categories":[6],"tags":[],"class_list":["post-845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lego-mindstorm"],"_links":{"self":[{"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/comments?post=845"}],"version-history":[{"count":38,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/posts\/845\/revisions"}],"predecessor-version":[{"id":1075,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/posts\/845\/revisions\/1075"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/media\/934"}],"wp:attachment":[{"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/media?parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/categories?post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bversion.com\/WordPress\/wp-json\/wp\/v2\/tags?post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}