### First Try with 7bot Robot Arm

In a previous post (http://robotsandphysicalcomputing.blogspot.co.uk/2016/05/playing-7bot-robot-arm.html) I discussed starting to set up the 7bot robot arm (https://www.kickstarter.com/projects/1128055363/7bot-a-powerful-desktop-robot-arm-for-future-inven) . I have still to set up the gripper.

This post document my first tentative steps with playing with it. The code below was used to try and get my head around the positioning of the arm - which servo does what (a good guide for this has been provide by the company online) and what the changing angle on the servos actual does. Essentially the code puts the arm in a starting position and varies the angles from there in usually in 15 or 30 degree increments over seven positions.

#include <Servo.h>
#include <DueFlashStorage.h>
#include <Arm7Bot.h>
Arm7Bot Arm;
void setup() {
// initial 7Bot Arm
Arm.initialMove();
}

void loop() {
// set motor[0] speed to 100
Arm.maxSpeed[0] = 30;
double angles_0[SERVO_NUM] =  {0, 100, 90, 0, 90, 90, 75};
Arm.move(angles_0);
// Move to pose 1
double angles_1[SERVO_NUM] =  {0, 100, 0, 0, 90, 90, 75};
Arm.move(angles_1);
// Move to pose 2
double angles_2[SERVO_NUM] =  {30, 110, 15, 0, 90, 90, 75};
Arm.move(angles_2);
// Move to pose 3
double angles_3[SERVO_NUM] =  {60, 120, 30, 0, 90, 90, 75};
Arm.move(angles_3);
// Move to pose 4
double angles_4[SERVO_NUM] =  {90, 130, 45, 0, 90, 90, 75};
Arm.move(angles_4);
// Move to pose 5
double angles_5[SERVO_NUM] =  {120, 140, 60, 0, 90, 90, 75};
Arm.move(angles_5);
// Move to pose 6
double angles_6[SERVO_NUM] =  {150, 150, 75, 0, 90, 90, 75};
Arm.move(angles_6);

}

Video below shows the routine in action.

All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

### Micro:bit, Servo control with Micropython or blocks

You can control servos (small ones) from a Micro:Bit directly. Following a link from the David Whale (Twitter ) , thank you, took me to a Kitronik blog post, https://www.kitronik.co.uk/blog/using-bbc-microbit-control-servo/, which has the answer.

The code uses Microsoft Blocks taken from the post, runs the servos 180 degrees and back again, when button A is pressed. It does exactly what it should. I am also using the Tower Pro SG90 servo.
Can it be replicated in Micropython? This is a new mini project, there seems to be little out there yet on how do this but the best so far is this video by PHILG2864:

The closest I have is the following, it is essentially there.
from microbit import *
pin0.set_analog_period(20)
while True:
pin0.write_analog(180)
sleep(1000)
pin0.write_analog(1)
sleep(1000)

Setting the time period to 20ms  pin0.set_analog_period(20)seems by experiment (and used in the video above) to be best value so far. The reason for pin0.write_analog(1)  set to 1 i…

### 4Tronix Bit:Bot Neuron Controlled Edge follower

In thelast post I was playing with 4Tronix'sBit:Bot. In this post I will show the initial experimentation with an artificial neuron controlling the Bit:Bot to follow the edge of a line (it follows the left-hand side of the line).

The neurons (well two separate ones, S1 and S2) are produced using weighted sums - summing the weights x inputs [ right-hand sensor (rs) and left-hand sensor (ls)] plus a bias for each neuron in this case w[0] and w[3].

net=w[0]+w[1]*rs+w[2]*ls           net2=w[3]+w[4]*rs+w[5]*ls

If weighted sum >=0 then its output 1 otherwise 0 if net>=0:          s1=1     else:         s1=0
if net2>=0:         s2=1     else:         s2=0
What actual causes S1 to be either 1 or 0 is all defined by a set of weights w (three for the first neurone, S1,  three for S2).
w=[0,-1,1,-1,1,-1]

Converting the outputs of the two neurones S1 and S2 into actions is shown below.

### my robot BETT2017

I will start with a confession, I only had about 2 1/2 hours at BETT 2017 due to external time pressures so to say I didn't yet a chance for a good (or even a bad) look around is an understatement; so I am not reviewing the show just a few notes on what I did manage to see.

STEAM Village
First and mostly, it was great to talk to so many people, only few I had met face to face previously, about robots, micro:bits, Raspberry Pis and coding. Most of this happen in the relatively small (compared to the event space) STEAM village and nearby stalls. It was great to see the strong presence of both Raspberry Pi and Micro:Bit Foundation, along the variety of different activities and example usage of both, with Code Club (I know it is part of Raspberry Pi Foundation) there was well. This was all alongside some other companies

Four of these stuck in my mind.

1. DFRobot (https://www.dfrobot.com/) with their range of Arduino-based robots and non-programmable kits. The two kits that caught my eye w…