# Case 08: Auto Pick-up Device ## Introduction --- - In the normal pick-up of the nut fruits, we usually use a stick to chop the branches to get the mature fruits, which could do a bad harm to the leaves and branches,thus, we can make an auto pick-up device by shaking the trunk of the tree. ## Function --- - Shake the trunk of the tree to get the fruits. ## Products Link --- - 1 x [microbit Smart Agriculture Kit](https://shop.elecfreaks.com/products/elecfreaks-micro-bit-smart-agriculture-kit-without-micro-bit-board?_pos=2&_sid=2c86b7764&_ss=r) ## Picture --- ![](./images/microbit-Smart-Agriculture-Kit-case-01-02.png) ## Hardware Connection --- Connect the servo to P1 on IoT:bit. ![](./images/microbit-Smart-Agriculture-Kit-case-08-03.png) ## Software Programming --- Click "Advanced" in the MakeCode to see more choices. ![](./images/microbit-Smart-Agriculture-Kit-case-01-04.png) For programming, we need to add a package: click "Extensions" at the bottom of the MakeCode drawer and search with "servo" in the dialogue box to download it. ![](./images/microbit-Smart-Agriculture-Kit-case-01-06.png) ***Notice:*** If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu. ## Program --- Set the servo to drive to 90°, pause for 200ms, then set it to drive to 0° and pause another 200ms. ![](./images/microbit-Smart-Agriculture-Kit-case-08-07.png) Link: [https://makecode.microbit.org/_EdPD6HckVEuE](https://makecode.microbit.org/_EdPD6HckVEuE)
## Result --- - Shake the trunk via the servo to pick up the fruits.