Tinkering TI MSP430F5529

Shawon Shahryiar @ Embedded Lab writes:

In my past tutorials on MSP430s, I demonstrated how to get started with MSP430 general purpose microcontrollers from Texas Instruments (TI). Those tutorials covered most aspects of low and mid-end MSP430G2xxx series microcontrollers. For those tutorials, TI’s official software suite – Code Composer Studio (CCS) – an Eclipse-based IDE and GRACE – a graphical peripheral initialization and configuration tool similar to STM32CubeMX were used. To me, those low and mid-end TIs chips are cool and offer best resources one can expect at affordable prices and small physical form-factors. I also briefly discussed about advanced MSP430 microcontrollers and the software resources needed to use them effectively. Given these factors, now it is high time that we start exploring an advanced 16-bit TI MSP430 microcontroller using a combination of past experiences and advanced tools.

See the full post at embedded-lab.com.

from Dangerous Prototypes https://ift.tt/3eg4JZZ

Signal generator control project

VE3POA published his DIY signal generator control project:

I built a step attenuator, highlighted in 2 previous posts, and quite some time ago I experimented with the AD8307 logarithmic amplifier chip and have a couple of prototype circuits for measuring low power signals sitting around in the junk box. I have the prototype SigGen as well the Arduino board I used for those experiments was still in one piece with the original program. So, why not put all the pieces together and see what happens.

More details on VE3POA’s blog.

from Dangerous Prototypes https://ift.tt/2xZMs2n

Make a Side Pocket-esque pool game | Wireframe #36

Recreate the arcade pool action of Data East’s Side Pocket. Raspberry Pi’s own Mac Bowley has the code.

In the original Side Pocket, the dotted line helped the player line up shots, while additional functions on the UI showed where and how hard you were striking the cue ball.

Created by Data East in 1986, Side Pocket was an arcade pool game that challenged players to sink all the balls on the table and achieve a minimum score to progress. As the levels went on, players faced more balls in increasingly difficult locations on the table.

Here, I’ll focus on three key aspects from Side Pocket: aiming a shot, moving the balls, and handling collisions for balls and pockets. This project is great for anyone who wants to dip their toe into 2D game physics. I’m going to use the Pygame’s built-in collision system as much as possible, to keep the code readable and short wherever I can.

Making a pool game

Before thinking about aiming and moving balls, I need a table to play on. I created both a border and a play area sprite using piskelapp.com; originally, this was one sprite, and I used a rect to represent the play area (see Figure 1). Changing to two sprites and making the play area an actor made all the collisions easier to handle and made everything much easier to place.

Figure 1: Our table with separate border. You could add some detail to your own table, or even adapt a photograph to make it look even more realistic.

For the balls, I made simple 32×32 sprites in varying colours. I need to be able to keep track of some information about each ball on the table, such as its position, a sprite, movement, and whether it’s been pocketed or not – once a ball’s pocketed, it’s removed from play. Each ball will have similar functionality as well – moving and colliding with each other. The best way to do this is with a class: a blueprint for each ball that I will make copies of when I need a new ball on the table.

class Ball:
def __init__(self, image, pos):
self.actor = Actor(image, center=pos, anchor=(“center”, “center”))
self.movement = [0, 0]
self.pocketed = False

def move(self):
self.actor.x += self.movement[0]
self.actor.y += self.movement[1]
if self.pocketed == False:
if self.actor.y < playArea.top + 16 or self.actor.y > playArea.bottom-16:
self.movement[1] = -self.movement[1]
self.actor.y = clamp(self.actor.y, playArea.top+16, playArea.bottom-16)
if self.actor.x < playArea.left+16 or self.actor.x > playArea.right-16:
self.movement[0] = -self.movement[0]
self.actor.x = clamp(self.actor.x, playArea.left+16, playArea.right-16)
else:
self.actor.x += self.movement[0]
self.actor.y += self.movement[1]
self.resistance()

def resistance(self):
# Slow the ball down
self.movement[0] *= 0.95
self.movement[1] *= 0.95

if abs(self.movement[0]) + abs(self.movement[1]) < 0.4:
self.movement = [0, 0]

The best part about using a class is that I only need to make one piece of code to move a ball, and I can reuse it for every ball on the table. I’m using an array to keep track of the ball’s movement – how much it will move each frame. I also need to make sure it bounces off the sides of the play area if it hits them. I’ll use an array to hold all the balls on the table.

To start with, I need a cue ball:

balls = []
cue_ball = Ball(“cue_ball.png”, (WIDTH//2, HEIGHT//2))
balls.append(cue_ball)

Aiming the shot

In Side Pocket, players control a dotted line that shows where the cue ball will go when they take a shot. Using the joystick or arrow buttons rotated the shot and moved the line, so players could aim to get the balls in the pockets (see Figure 2). To achieve this, we have to dive into our first bit of maths, converting a rotation in degrees to a pair of x and y movements. I decided my rotation would be at 0 degrees when pointing straight up; the player can then press the right and left arrow to increase or decrease this value.

Figure 2: The dotted line shows the trajectory of the ball. Pressing the left or right arrows rotates the aim.

Pygame Zero has some built-in attributes for checking the keyboard, which I’m taking full advantage of.

shot_rotation = 270.0 # Start pointing up table
turn_speed = 1
line = [] # To hold the points on my line
line_gap = 1/12
max_line_length = 400
def update():
global shot_rotation

## Rotate your aim
if keyboard[keys.LEFT]:
shot_rotation -= 1 * turn_speed
if keyboard[keys.RIGHT]:
shot_rotation += 1 * turn_speed

# Make the rotation wrap around
if shot_rotation > 360:
shot_rotation -= 360
if shot_rotation < 0:
shot_rotation += 360

At 0 degrees, my cue ball’s movement should be 0 in the x direction and -1 in y. When the rotation is 90 degrees, my x movement would be 1 and y would be zero; anything in between should be a fraction between the two numbers. I could use a lot of ‘if-elses’ to set this, but an easier way is to use sin and cos on my angle – I sin the rotation to get my x value and cos the rotation to get the y movement.

# The in-built functions need radian
rot_radians = shot_rotation * (math.pi/180)

x = math.sin(rot_rads)
y = -math.cos(rot_rads)
if not shot:
current_x = cue_ball.actor.x
current_y = cue_ball.actor.y
length = 0
line = []
while length < max_line_length:
hit = False
if current_y < playArea.top or current_y > playArea.bottom:
y = -y
hit = True
if current_x < playArea.left or current_x > playArea.right:
x = -x
hit = True
if hit == True:
line.append((current_x-(x*line_gap), current_y-(y*line_gap)))
length += math.sqrt(((x*line_gap)**2)+((y*line_gap)**2) )
current_x += x*line_gap
current_y += y*line_gap
line.append((current_x-(x*line_gap), current_y-(y*line_gap)))

I can then use those x and y co-ordinates to create a series of points for my aiming line.

Shooting the ball

To keep things simple, I’m only going to have a single shot speed – you could improve this design by allowing players to load up a more powerful shot over time, but I won’t do that here.

shot = False
ball_speed = 30


## Inside update
## Shoot the ball with the space bar
if keyboard[keys.SPACE] and not shot:
shot = True
cue_ball.momentum = [x*ball_speed, y*ball_speed]

When the shot variable is True, I’m going to move all the balls on my table – at the beginning, this is just the cue ball – but this code will also move the other balls as well when I add them.

# Shoot the ball and move all the balls on the table
else:
shot = False
balls_pocketed = []
collisions = []
for b in range(len(balls)):
# Move each ball
balls[b].move()
if abs(balls[b].momentum[0]) + abs(balls[b].momentum[1]) > 0:
shot = True

Each time I move the balls, I check whether they still have some movement left. I made a resistance function inside the ball class that will slow them down.

Collisions

Now for the final problem: getting the balls to collide with each other and the pockets. I need to add more balls and some pocket actors to my game in order to test the collisions.

balls.append(Ball(“ball_1.png”, (WIDTH//2 - 75, HEIGHT//2)))
balls.append(Ball(“ball_2.png”, (WIDTH//2 - 150, HEIGHT//2)))

pockets = []
pockets.append(Actor(“pocket.png”, topleft=(playArea.left, playArea.top), anchor=(“left”, “top”)))
# I create one of these actors for each pocket, they are not drawn

Each ball needs to be able to collide with the others, and when that happens, the direction and speed of the balls will change. Each ball will be responsible for changing the direction of the ball it has collided with, and I add a new function to my ball class:

def collide(self, ball):
collision_normal = [ball.actor.x - self.actor.x, ball.actor.y - self.actor.y]
ball_speed = math.sqrt(collision_normal[0]**2 + collision_normal[1]**2)
self_speed = math.sqrt(self.momentum[0]**2 + self.momentum[1]**2)
if self.momentum[0] == 0 and self.momentum[1] == 0:
ball.momentum[0] = -ball.momentum[0]
ball.momentum[1] = -ball.momentum[1]
elif ball_speed > 0:
collision_normal[0] *= 1/ball_speed
collision_normal[1] *= 1/ball_speed
ball.momentum[0] = collision_normal[0] * self_speed
ball.momentum[1] = collision_normal[1] * self_speed

When a collision happens, the other ball should move in the opposite direction to the collision. This is what allows you to line-up slices and knock balls diagonally into the pockets. Unlike the collisions with the edges, I can’t just reverse the x and y movement. I need to change its direction, and then give it a part of the current ball’s speed. Above, I’m using a normal to find the direction of the collision. You can think of this as the direction to the other ball as they collide.

Our finished pool game. See if you can expand it with extra balls and maybe a scoring system.

Handling collisions

I need to add to my update loop to detect and store the collisions to be handled after each set of movement.

# Check for collisions
for other in balls:
if other != b and b.actor.colliderect(other.actor):
collisions.append((b, other))
# Did it sink in the hole?
in_pocket = b.actor.collidelistall(pockets)
if len(in_pocket) > 0 and b.pocketed == False:
if b != cue_ball:
b.movement[0] = (pockets[in_pocket[0]].x - b.actor.x) / 20
b.movement[1] = (pockets[in_pocket[0]].y - b.actor.y) / 20
b.pocket = pockets[in_pocket[0]]
balls_pocketed.append(b)
else:
b.x = WIDTH//2
b.y = HEIGHT//2

First, I use the colliderect() function to check if any of the balls collide this frame – if they do, I add them to a list. This is so I handle all the movement first and then the collisions. Otherwise, I’m changing the momentum of balls that haven’t moved yet. I detect whether a pocket was hit as well; if so, I change the momentum so that the ball heads towards the pocket and doesn’t bounce off the walls anymore.

When all my balls have been moved, I can handle the collisions with both the other balls and the pockets:

for col in collisions:
col[0].collide(col[1])
if shot == False:
for b in balls_pocketed:
balls.remove(b)

And there you have it: the beginnings of an arcade pool game in the Side Pocket tradition. You can get the full code and assets right here.

Get your copy of Wireframe issue 36

You can read more features like this one in Wireframe issue 36, available directly from Raspberry Pi Press — we deliver worldwide. And if you’d like a handy digital version of the magazine, you can also download issue 36 for free in PDF format.

Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

The post Make a Side Pocket-esque pool game | Wireframe #36 appeared first on Raspberry Pi.

Noticia Original

Intelligent 7-Segment display

An intelligent 7-Segment display based on Padauk MCU:

I elected to use a PADAUK PFS154-S16 as microcontroller for each segment. This device has flash memory and sufficient I/O to control a 7 segment display without multiplexing. The cost is only $0.07, so it is cheaper than, for example, using multiple WS2811 instead. The data input pin is connected to PA0, which allows using a pin change interrupt to detect incoming transmissions. Data out is PA6, while PB0-PB7 are used to control the display.

See the full post on Tim’s blog.

from Dangerous Prototypes https://ift.tt/2RhXWoD

Digital making at home: a guide for parents

This blog post is for parents. Specifically, it’s for parents who want to help their kids get into making things with technology but don’t know where to start.

Lots of us at the Raspberry Pi Foundation are parents too, and right now we’re also all trying to figure out how to keep our kids occupied, entertained, and learning useful things. So we recognise that families are currently facing lots of challenges, which is why we’re supporting parents and carers with learning for young people at home.

We already provide loads of resources and activities that are available for free, online, in up to 30 languages, and we’ll help you get your children set up and started.

A young person having fun with digital making at home

You don’t need any coding experience to get involved

All of our online projects for young people are completely free. They include step-by-step instructions and are easily filtered by level and topic. The projects are designed so that young people can complete them in no more than an hour.

You don’t need any coding experience yourself. The step-by-step instructions mean you can learn alongside your child, or, as long as they can read the instructions themselves, they can work independently on the projects.

A teenager having fun with digital making at home

Watch our support tutorials 

If you’re wondering where to start, or how digital making can work for your young people at home, take a look at our introduction video by Mark, our Youth Programmes Manager. He tells you about Scratch, a free graphical programming language developed by our friends at the Scratch Foundation (plus, it’s the language used to teach computing in most primary schools and a great place to start for beginners):

A parents’ introduction to the programming language Scratch

Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytc…

He also takes you through our project site, which is where all the fun stuff happens:

How to use the Raspberry Pi projects site

Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytc…

The Digital Making at Home initiative

We’re also offering a series of free weekly, instructor-led videos called Digital Making at Home, which have code-along instructions to help young people with fun projects they can do independently at home. Here’s more information about how you and your family can get involved.

Get involved in Digital Making at Home

Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytc…

Sign up for our free content tailored to your needs

Sign up now to start receiving free activities suitable to your child’s age and ability straight to your inbox. And let us know what you as a parent or carer need help with, and what you’d like more or less of.

A child having fun with digital making at home using a tablet

What parents and carers say

“I started to try coding activities with my kids a few years ago (now aged 8 and 11). They really like the clear instructions from the Raspberry Pi projects site, it has helped build their confidence particularly when getting started. Their interest in coding has gone up and down over that time, but when I sense that they are losing interest I try to step back and not push it. They like coding simple games particularly, and changing the rules to make it easier for them to win!” Olympia, parent and Head of Youth Partnerships at the Raspberry Pi Foundation 

A girl with her Scratch project

“Finding independent activities is really hard – especially good ones that are also educational. Once we were up and running, Dylan (age 9) was able to follow the step-by-step video and make a game in Scratch by himself!”  Dan, step-parent 

A child having fun with digital making at home using a Crumble controller

“My younger daughter is on the autistic spectrum and really enjoys creating projects which appeal to her particular interests. So we often modify Scratch projects so that she can use different images or add in different sounds. Shifting the focus to things she particularly enjoys means that when we hit a bug, she is more motivated to persevere, fix it, and celebrate her success. Taking a child-centred approach is important for lots of children who want to be in control of their own learning journey.” Katharine, parent and Programme Coordinator at the Raspberry Pi Foundation 

“I introduced my son to coding in Scratch when he was 6. At the start, it was important to sit with him as he worked through little projects. I kept my hands away from his mouse and keyboard and let him explore the interface, with a bit of gentle guidance. Within no time he was independently creating his own projects, and using Scratch for his school work and home life. He even created a random Karate moves generator to help him prepare for a Karate grading. Eventually he wanted to move on though, and when Scratch became too limited we explored some HTML and CSS, and then a little Python. He’s now fully independent, and coding 3D games using Unity. It’s got to the point where he’s using a language that I have no experience with, so debugging just involves me asking him to explain his code and helping him to find solutions online.” Marc Scott, Parent and Senior Learning Manager at the Raspberry Pi Foundation

Our simple top tips (from Marc, Senior Learning Manager)

  • If possible, sit with your child and have them explain to you what they are doing. You don’t have to understand the code, but you can listen and ask questions. If they talk through their thought process, they’re more likely to be successful.
  • Maintain a hands-off approach: offer them suggestions rather than instructions, and keep your hands off their keyboard and mouse.
  • Getting things wrong is one of the best ways to learn. When they encounter bugs in their programs (which they will!), ask questions before giving answers. Try “Why do you think that didn’t work? or “Have you tried changing this bit of code?”
  • Pick tools that are accessible or familiar to the young person. If they like Scratch, then stick with it until they’re trying to do things so complicated that they need more advanced software.
  • If a young person is going to share their project online, you should remind them not to include personal information in it. Tip: Your child has probably learned about e-safety at school, so why not ask them about the rules they’ve learned in class?
  • Always ask the young person to show you what they have made, and show enthusiasm for their work. You may not have a clue what it is, or you might think it’s super simple, but they’ll be proud of it and encouraged if you are too!

PS: All of our resources are completely free. This is made possible thanks to the generous donations of individuals and organisations. Learn how you can help too!

The post Digital making at home: a guide for parents appeared first on Raspberry Pi.

Noticia Original

#FreePCB via Twitter to 2 random RTs

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

from Dangerous Prototypes https://ift.tt/2xbXS2S

TED Talks Daily welcomes inaugural host, Elise Hu

TED Talks Daily welcomes inaugural host, Elise Hu.

TED Talks Daily, TED’s most-downloaded podcast, welcomes its inaugural host: Elise Hu. After nearly a decade at NPR, Elise’s first episode of TED Talks Daily will be released on April 6. While at NPR, Elise was a regular contributor to All Things Considered and Morning Edition. She filed stories from more than a dozen countries as an international correspondent and opened NPR’s first-ever Seoul bureau. Hu also created the Gracie-award winning video series Elise Tries and helped found The Texas Tribune, a nonprofit digital startup.

“I’m hungry to learn and grow. And now, I get to watch and introduce fresh ideas from the global community of TED speakers … for my job! What a privilege,” says Hu. “During this period of being inside and looking inward I’ve found this opportunity to join the TED team and learn from the vast TED community to be a balm and a salve. I can’t wait to engage further with the worldwide TED audience.”

TED’s podcasts are downloaded more than 420 million times annually. TED Talks Daily, which is downloaded one million times per day, is one of the most downloaded shows, and not just in the US — it’s been featured in Apple Podcasts’ top ten charts in 130 countries around the world (more than any other podcast).

Every weekday, TED Talks Daily features the latest talks in audio. Listeners tune in for thought-provoking talks on every subject imaginable — from artificial intelligence to zoology, and everything in between — given by the world’s leading thinkers and creators. TED Talks Daily aims to inspire listeners to change their perspectives, ignite their curiosity and learn something new. As host, Elise brings an inquiring mind and journalistic background to guide audiences and lay the foundation for each episode.

TED Talks Daily has long been a favorite way for audiences to engage with TED Talks, so we’re looking forward to adding onto the format,” said Colin Helms, head of media at TED. “What listeners have come to know and love about TED Talks Daily will continue, but with Elise as our host, we can build a richer backdrop for our talks.”

Michelle Quint, editorial director of format development at TED, added: “Elise embodies the very spirit of TED Talks Daily — smart, joyful and deeply curious about the world around her. We feel so lucky to have her at the helm.”

Partners play a crucial role in bringing TED’s content to the public. TED Talks Daily is sponsored by some of the most innovative and interesting organizations in the world today. TED strives to tell their stories in the form of authentic, story-driven content developed in real-time and aligned with our editorial process — finding and exploring brilliant ideas from unlikely places.

New episodes of TED Talks Daily air every weekday and are available on Apple Podcasts, Spotify, the TED Android app or wherever you like to listen to podcasts.

from TED Blog https://ift.tt/2Xk2hLY

Five years of Raspberry Pi clusters

In this guest blog post, OpenFaaS founder and Raspberry Pi super-builder Alex Ellis walks us down a five-year-long memory lane explaining how things have changed for cluster users.

I’ve been writing about running Docker on Raspberry Pi for five years now and things have got a lot easier than when I started back in the day. There’s now no need to patch the kernel, use a bespoke OS, or even build Go and Docker from scratch.

My stack of seven Raspberry Pi 2s running Docker Swarm (2016)

Since my first blog post and printed article, I noticed that Raspberry Pi clusters were a hot topic. They’ve only got even hotter as the technology got easier to use and the devices became more powerful.

Back then we used ‘old Swarm‘, which was arguably more like Kubernetes with swappable orchestration and a remote API that could run containers. Load-balancing wasn’t built-in, and so we used Nginx to do that job.

I built out a special demo using kit from Pimoroni.com. Each LED lit up when a HTTP request came in.

Docker load-balanced LED cluster Raspberry Pi

Ask questions and get all the details including the code over on the blog at: https://ift.tt/1TW13JW

After that, I adapted the code and added in some IoT sensor boards to create a smart datacenter and was invited to present the demo at Dockercon 2016:

IoT Dockercon Demo

Get all the write-up here: https://ift.tt/39RjIGe

Docker then released a newer version of Swarm also called ‘Swarm’ and I wrote up these posts:

Docker Swarm mode Deep Dive on Raspberry Pi (scaled)

Please Subscribe to the channel! Get all the details @ https://ift.tt/2bBVvps

This is still my most popular video on my YouTube channel.

Now that more and more people were trying out Docker on Raspberry Pi (arm), we had to educate them about not running potentially poisoned images from third-parties and how to port software to arm. I created a Git repository (alexellis/docker-arm) to provide a stack of common software.

I wanted to share with users how to use GPIO for accessing hardware and how to create an IoT doorbell. This was one of my first videos on the topic, a live run-through in one take.

birds eye view of a raspberry pi in a red case

Did you know? I used to run blog.alexellis.io on my Raspberry Pi 3

Then we all started trying to run upstream Kubernetes on our 1GB RAM Raspberry Pis with kubeadm. Lucas Käldström did much of the groundwork to port various Kubernetes components and even went as far as to fix some issues in the Go language.

I wrote a recap on everything you needed to know including exec format error and various other things. I also put together a solid set of instructions and workarounds for kubeadm on Raspberry Pi 2/3.

Users often ask what a practical use-case is for a cluster. They excel at running distributed web applications, and OpenFaaS is loved by developers for making it easy to build, deploy, monitor, and scale APIs.

In this post you’ll learn how to deploy a fun Pod to generate ASCII text, from there you can build your own with Python or any other language:

This blog post was one of the ones that got pinned onto the front page of Hacker News for some time, a great feeling when it happens, but something that only comes every now and then.

The instructions for kubeadm and Raspbian were breaking with every other minor release of Kubernetes, so I moved my original gist into a Git repo to accept PRs and to make the content more accessible.

I have to say that this is the one piece of Intellectual Property (IP) I own which has been plagiarised and passed-off the most.

You’ll find dozens of blog posts which are almost identical, even copying my typos. To begin with I found this passing-off of my work frustrating, but now I take it as a vote of confidence.

Shortly after this, Scott Hanselman found my post and we started to collaborate on getting .NET Core to work with OpenFaaS.

Lego batman and his lego friend atop a cluster of Raspberry Pi

This lead to us co-presenting at NDC, London in early 2018. We were practising the demo the night before, and the idea was to use Pimoroni Blinkt! LEDs to show which Raspberry Pi a Pod (workload) was running on. We wanted the Pod to stop showing an animation and to get rescheduled when we pulled a network cable.

It wasn’t working how we expected, and Scott just said “I’ll phone Kelsey”, and Mr Hightower explained to us how to tune the kubelet tolerance flags.

As you can see from the demo, Kelsey’s advice worked out great!

Building a Raspberry Pi Kubernetes Cluster and running .NET Core – Alex Ellis & Scott Hanselman

Join Scott Hanselman and Alex Ellis as they discuss how you can create your own Raspberry Pi cluster that runs Kubernetes on the metal. Then, take it to the …

 

Fast forward and we’re no longer running Docker, or forcing upstream Kubernetes into 1GB of RAM, but running Rancher’s light-weight k3s in as much as 4GB of RAM.

k3s is a game-changer for small devices, but also runs well on regular PCs and cloud. A server takes just 500MB of RAM and each agent only requires 50MB of RAM due to the optimizations that Darren Shepherd was able to make.

I wrote a new Go CLI called k3sup (‘ketchup’) which made building clusters even easier than it was already and brought back some of the UX of the Docker Swarm CLI.

Kubernetes Homelab with Raspberry Pi 4

Join me for this hands-on tutorial where I build out a Kubernetes Homelab with a Raspberry Pi 4 and get internet access with a LoadBalancer, something normal…

To help combat the issues around the Kubernetes ecosystem and tooling like Helm, which wasn’t available for ARM, I started a new project named arkade . arkade makes it easy to install apps whether they use helm charts or kubectl for installation.

k3s, k3sup, and arkade are all combined in my latest post which includes installing OpenFaaS and the Kubernetes dashboard.

In late March I put together a webinar with Traefik to show off all the OpenFaaS tooling including k3sup and arkade to create a practical demo. The demo showed how to get a public IP for the Raspberry Pi cluster, how to integrate with GitHub webhooks and Postgresql.

The latest and most up-to-date tutorial, with everything set up step by step:

Cloud Native Tools for Developers with Alex Ellis and Alistair Hey

In this Traefik Online Meetup, Alex Ellis, Founder of OpenFaaS, and Alistair Hey, from the OpenFaaS community, will show you how to bootstrap a Kubernetes cl…

 

In the webinar you’ll find out how to get a public IP for your IngressController using the inlets-operator.

Take-aways

  • People will always hate

Some people try to reason about whether you should or should not build a cluster of Raspberry Pis. If you’re asking this question, then don’t do it and don’t ask me to convince you otherwise.

  • It doesn’t have to be expensive

You don’t need special equipment, you don’t even need more than one Raspberry Pi, but I would recommend two or three for the best experience.

  • Know what to expect

Kubernetes clusters are built to run web servers and APIs, not games like you do with your PC. They don’t magically combine the memory of each node into a single supercomputer, but allow for horizontal scaling, i.e. more replicas of the same thing.

  • Not everything will run on it

Some popular software like Istio, Minio, Linkerd, Flux and SealedSecrets do not run on ARM devices because the maintainers are not incentivised to make them do so. It’s not trivial to port software to ARM and then to support that on an ongoing basis. Companies tend to have little interest since paying customers do not tend to use Raspberry Pis. You have to get ready to hear “no”, and sometimes you’ll be lucky enough to hear “not yet” instead.

  • Things are always moving and getting better

If you compare my opening statement where we had to rebuild kernels from scratch, and even build binaries for Go, in order to build Docker, we live in a completely different world now. We’ve seen classic swarm, new swarm (swarmkit), Kubernetes, and now k3s become the platform of choice for clustering on the Raspberry Pi. Where will we be in another five years from now? I don’t know, but I suspect things will be better.

  • Have fun and learn

In my opinion, the primary reason to build a cluster is to learn and to explore what can be done. As a secondary gain, the skills that you build can be used for work in DevOps/Cloud Native, but if that’s all you want out of it, then fire up a few EC2 VMs on AWS.

Recap on projects

Featured: my 24-node uber cluster, chassis by Bitscope.

Featured: my 24-node uber cluster, chassis by Bitscope.

    • k3sup — build Raspberry Pi clusters with Rancher’s lightweight cut of Kubernetes called k3s
    • arkade — install apps to Kubernetes clusters using an easy CLI with flags and built-in Raspberry Pi support
    • OpenFaaS — easiest way to deploy web services, APIs, and functions to your cluster; multi-arch (arm + Intel) support is built-in
    • inlets — a Cloud Native Tunnel you can use to access your Raspberry Pi or cluster from anywhere; the inlets-operator adds integration into Kubernetes

Want more?

Well, all of that should take you some time to watch, read, and to try out — probably less than five years. I would recommend working in reverse order from the Traefik webinar back or the homelab tutorial which includes a bill of materials.

Become an Insider via GitHub Sponsors to support my work and to receive regular email updates from me each week on Cloud Native, Kubernetes, OSS, and more: github.com/sponsors/alexellis

And you’ll find hundreds of blog posts on Docker, Kubernetes, Go, and more on my blog over at blog.alexellis.io.

The post Five years of Raspberry Pi clusters appeared first on Raspberry Pi.

Noticia Original

Dual Mono AK4493 DAC (MK II)

An update on Dual Mono AK4490 DAC project we covered previously:

Since I was going to update the PCB design, I thought I might as well improve on as much as I could. So, the new board would:
*Include a new reclocking solution. I went for the best specc’ed chip out there, the famous Potato Semi PO74G374A. One chip would take care of the all of the I2S lines for both DAC chips.
*Add a couple of external 1.8V DVDD power supplies.
*Make some optimization of the LT3042 local regulators’ layout, in order to accommodate larger package capacitors (1206) where it would make most sense.
*Give access to the zero-detect lines of one of the dac chips. These pins could be used to easily implement auto muting of the output stage.
*Give access to the Enable pin of the Si570/Si544. The use of this Enable pin will be explained later.

See project details on Dimdim’s blog.

from Dangerous Prototypes https://ift.tt/2xX3Bd2

Cambridge Computing Education Research Symposium – recap of our online event

On Wednesday, we hosted the first-ever Cambridge Computing Education Research Symposium online. Research in computing education, particularly in school and for young people, is a young field compared to maths and science education, and we do not have much in terms of theoretical foundations. It is not a field that has received a lot of funding, so we cannot yet look to large-scale, longitudinal, empirical studies for evidence. Therefore, further research on how best to teach, learn, and assess computing is desperately needed. We also need to investigate ways of inspiring and motivating all young people in an area which is increasingly important for their future.

That’s why at the Raspberry Pi Foundationwe have made research a key part of our new strategy, and that’s why we worked with the University of Cambridge to hold this event.

Moving the symposium online

This was to be our first large-scale research event, held jointly with the University of Cambridge Department of Computer Science and Technology. Of course, current circumstances made it necessary for us to turn the symposium from a face-to-face into an online event at short notice.

Screengrab from the Cambridge Computing Education Research Symposium 2020 online event

An enthusiastic team took on the challenge, and we were delighted with how well the way the day went! You can see what participants shared throughout the day on Twitter.

Keynote presentation

Our keynote speaker was Dr Natalie Rusk of MIT and the Scratch Foundation, who shared her passion for digital creativity using Scratch.

Dr Natalie Rusk from the MIT Media Lab

We were excited to see images from early versions of Scratch and how it had developed over the years. Plus, Natalie revealed the cat blocks that were available on 1 April only — I had completely forgotten the day of the symposium was April Fools’ Day! The focus of Natalie’s presentation was on creativity, invention, tinkering, and the development of ideas over time, and she explored case studies of two ‘Scratchers’ who took a very different approach to working in the Scratch community on projects. The talk was well received by all.

Screengrab from the Cambridge Computing Education Research Symposium 2020 online event

Paper presentations

We heard from researchers from a range of institutions on topics under these themes:

  • Working with teachers on computing education research
  • Assessment tools and techniques
  • Perceptions and attitudes about computing
  • Theoretical frameworks used for computing education

Highlights for me were Ethel Tshukudu’s analysis of the way students transfer from one programming language to another, in which she draws on semantic transfer theory; and Paul Curzon’s application of Karl Maton’s semantic wave theory (taken from linguistics) to computing education.

The symposium’s focus was computing for young people, and much of the research presented was directly grounded in work with teachers and students in learning situations. Lynne Blair shared an interesting study highlighting female participation in A level computer science classes, which found the feeling of a lack of belonging among young women, a finding that echoes existing research around computing education and gender. Fenia Aivaloglou from the University of Leiden, Netherlands, considered the barriers faced by learners and teachers in extra-curricular code clubs, and Alison Twiner and Jo Shillingworth from the University of Cambridge shared a study on engaging young people in work-related computing projects.

We also heard how tools for supporting learners are developing, for example machine learning techniques to process natural language answers to questions on the free online learning platforms Isaac Computer Science and Isaac Physics.

Poster presentations

For the poster sessions, we divided into separate sessions so that the poster presenters could display and discuss their posters with a smaller group of people. This enabled more in-depth discussion about the topic being presented, which participants appreciated at this large online event. The 11 posters covered a wide range of topics from data visualisations in robotics to data-driven dance.

Screengrab from the Cambridge Computing Education Research Symposium 2020 online event

We showcased some of our own work on progression mapping with learning graphs for the NCCE Resource Repository; the Isaac Computer Science A level content platform; and our research into online learning with our free online courses for teachers.

Running an online symposium — what is it like?

From having successfully hosted this event online, we learned many lessons that we want to put into practice in future online events being offered by the Raspberry Pi Foundation.

There’s a plethora of tools available, and they all have their pros and cons (we used Google Meet). It’s my view that the tool is less important than the preparation needed for a large-scale online event, which is significant! The organising team hosted technical run-throughs with all presenters in the two days before the event, and instigated a ‘green room’ for all presenters to check their setups again five to ten minutes before their speaking slot. This helped to avoid a whole myriad of potential technical difficulties.

Screengrab from the Cambridge Computing Education Research Symposium 2020 online event

I’m so grateful to the great team at the Raspberry Pi Foundation, who worked behind the scenes all day to make sure that the participants and presenters got the most out of the event!

Stay in touch!

  • On the Research Symposium web page, you can now download the symposium’s abstract booklet. We will shortly be sharing recordings of the symposium’s presentations and files of slides and posters there as well.
  • When we moved the symposium online, we postponed two pre-symposium events: a workshop on gender balance, and a workshop on research-to-practice; we’re hoping to hold these as in-person events in the autumn.
  • Meanwhile, we are planning a series of online seminars, set to start on Tuesday 21 April at 17:00 BST and continue throughout the summer at two-week intervals.

If you’re interested in receiving a regular update about these and other research activities of ours, sign up to our newsletter.

We look forward to building a community of researchers and to sharing more of our work with you over the coming years.

The post Cambridge Computing Education Research Symposium – recap of our online event appeared first on Raspberry Pi.

Noticia Original