It has been a cold winter for Tom Shaffner, and since he is working from home and leaving the heating on all day, he decided it was finally time to see where his house’s insulation could be improved.
His first thought was to get a thermal IR (infrared) camera, but he found the price hasn’t yet come down as much as he’d hoped. They range from several thousand dollars down to a few hundred, with a $50 option just to rent one from a hardware store for 24 hours.
When he saw the $50 option, he realised he could just buy the $60 (£54) MLX90640 Thermal Camera from Pimoroni and attach it to a Raspberry Pi. Tom used a Raspberry Pi 4 for this project. Problem affordably solved.
Once Tom’s hardware arrived, he took advantage of the opportunity to combine elements of several other projects that had caught his eye into a single, consolidated Python library that can be downloaded via pip and run both locally and as a web server. Tom thanks Валерий Курышев, Joshua Hrisko, and Adrian Rosebrock for their work, on which this solution was partly based.
Tom has also published everything on GitHub for further open source development by any enterprising individuals who are interested in taking this even further.
The big question, though, was whether the image quality would be good enough to be of real use. A few years back, the best cheap thermal IR camera had only an 8×8 resolution – not great. The magic of the MLX90640 Thermal Camera is that for the same price the resolution jumps to 24×32, giving each frame 768 different temperature readings.
Add a bit of interpolation and image enlargement and the end result gets the job done nicely. Stream the video over your local wireless network, and you can hold the camera in one hand and your phone in the other to use as a screen.
Bonus: If you leave the web server running when you’re finished thermal imaging, you’ve got yourself an affordable infrared security camera.
Documentation on the setup, installation, and results are all available on Tom’s GitHub, along with more pictures of what you can expect.
And you can connect with Tom on LinkedIn if you’d like to learn more about this “technically savvy mathematical modeller”.
The post Raspberry Pi thermal camera appeared first on Raspberry Pi.
Une introduction aux différentes menaces qui pèsent sur les sociétés financières et aux mesures que les organisations peuvent prendre pour les contrer.
L'article Risques et défis en matière de cybersécurité pour le secteur financier a d'abord été publié sur WeLiveSecurity
Grab onto ropes and swing across chasms in our Python rendition of an Atari 2600 classic. Mark Vanstone has the code
Whether it was because of the design brilliance of the game itself or because Raiders of the Lost Ark had just hit the box office, Pitfall Harry became a popular character on the Atari 2600 in 1982.
His hazardous attempts to collect treasure struck a chord with eighties gamers, and saw Pitfall!, released by Activision, sell over four million copies. A sequel, Pitfall II: The Lost Caverns quickly followed the next year, and the game was ported to several other systems, even making its way to smartphones and tablets in the 21st century.
Designed by David Crane, Pitfall! was released for the Atari 2600 and published by Activision in 1982
The game itself is a quest to find 32 items of treasure within a 20-minute time limit. There are a variety of hazards for Pitfall Harry to navigate around and over, including rolling logs, animals, and holes in the ground. Some of these holes can be jumped over, but some are too wide and have a convenient rope swinging from a tree to aid our explorer in getting to the other side of the screen. Harry must jump towards the rope as it moves towards him and then hang on as it swings him over the pit, releasing his grip at the other end to land safely back on firm ground.
For this code sample, we’ll concentrate on the rope swinging (and catching) mechanic. Using Pygame Zero, we can get our basic display set up quickly. In this case, we can split the background into three layers: the background, including the back of the pathway and the tree trunks, the treetops, and the front of the pathway. With these layers we can have a rope swinging with its pivot point behind the leaves of the trees, and, if Harry gets a jump wrong, it will look like he falls down the hole in the ground. The order in which we draw these to the screen is background, rope, tree-tops, Harry, and finally the front of the pathway.
Now, let’s get our rope swinging. We can create an Actor and anchor it to the centre and top of its bounding box. If we rotate it by changing the angle property of the Actor, then it will rotate at the top of the Actor rather than the mid-point. We can make the rope swing between -45 degrees and 45 degrees by increments of 1, but if we do this, we get a rather robotic sort of movement. To fix this, we add an ‘easing’ value which we can calculate using a square root to make the rope slow down as it reaches the extremes of the swing.
Our homage to the classic Pitfall! Atari game. Can you add some rolling logs and other hazards?
Our Harry character will need to be able to run backwards and forwards, so we’ll need a few frames of animation. There are several ways of coding this, but for now, we can take the x coordinate and work out which frame to display as the x value changes. If we have four frames of running animation, then we would use the %4
operator and value on the x coordinate to give us animation frames of 0, 1, 2, and 3. We use these frames for running to the right, and if he’s running to the left, we just mirror the images. We can check to see if Harry is on the ground or over the pit, and if he needs to be falling downward, we add to his y coordinate. If he’s jumping (by pressing the SPACE
bar), we reduce his y coordinate.
We now need to check if Harry has reached the rope, so after a collision, we check to see if he’s connected with it, and if he has, we mark him as attached and then move him with the end of the rope until the player presses the SPACE
bar and he can jump off at the other side. If he’s swung far enough, he should land safely and not fall down the pit. If he falls, then the player can have another go by pressing the SPACE
bar to reset Harry back to the start.
That should get Pitfall Harry over one particular obstacle, but the original game had several other challenges to tackle – we’ll leave you to add those for yourselves.
Here’s Mark’s code for a Pitfall!-style platformer. To get it working on your system, you’ll need to install Pygame Zero. And to download the full code and assets, head here.
The post Swing into action with an homage to Pitfall! | Wireframe #48 appeared first on Raspberry Pi.
How do I check or find NetworkManager version on Linux distribution?
The post How to find NetworkManager version on Linux appeared first on nixCraft.
Tous les auteurs de crimes et de fraudes en ligne n'utilisent pas de méthodes avancées pour s'en prendre à leurs victimes sans se faire prendre, loin s'en faut.
L'article La sophistication n’est pas l’apanage de tous les cybercriminels a d'abord été publié sur WeLiveSecurity
Méfiez-vous des tentatives d'hameçonnage via SMS
L'article Capsule cybersécurité: Campagne de smishing ciblant les utilisateurs PayPal a d'abord été publié sur WeLiveSecurity
Bienvenue sur WordPress. Ceci est votre premier article. Modifiez-le ou supprimez-le, puis commencez à écrire !
We can easily add a key file to LUKS disk encryption on Linux when running the cryptsetup command. A key file is used as the passphrase to unlock an encrypted volume. The passphrase allows Linux users to open encrypted disks utilizing a keyboard or over an ssh-based session. There are different types of key files we can add and enable LUKS disk encryption on Linux as per our needs:
Let us see how to enable LUKS disk encryption with a key file.
The post How to enable LUKS disk encryption with keyfile on Linux appeared first on nixCraft.
Our Chief Operating Officer and Hardware Lead James Adams talked to The MagPi Magazine about building Raspberry Pi’s first microcontroller platform.
On 21 January we launched the $4 Raspberry Pi Pico. As I write, we’ve taken orders for nearly a million units, and are working hard to ramp production of both the Pico board itself and the chip that powers it, the Raspberry Pi RP2040.
Microcontrollers are a huge yet largely unseen part of our modern lives. They are the hidden computers running most home appliances, gadgets, and toys. Pico and RP2040 were born of our desire to do for microcontrollers what we had done for computing with the larger Raspberry Pi boards. We wanted to create an innovative yet radically low-cost platform that was easy to use, powerful, yet flexible.
It became obvious that to stand out from the crowd of existing products in this space and to hit our cost and performance goals, we would need to build our own chip.
I and many of the Raspberry Pi engineering team have been involved in chip design in past lives, yet it took a long time to build a functional chip team from scratch. As well as requiring specialist skills, you need a lot of expensive tools and IP; and before you can buy these things, there is a lot of work required to evaluate and decide exactly which expensive goodies you’ll need. After a slow start, for the past couple of years we’ve had a small team working on it full-time, with many others pulled in to help as needed.
The Pico board was designed alongside RP2040 – in fact we designed the RP2040 pinout to work well on Pico, so we could use an inexpensive two-layer PCB, without compromising on the layout. A lot of thought has gone into making it as low-cost and flexible as possible – from the power circuitry to packaging the units on to Tape and Reel (which is cost-effective and has good packing density, reducing shipping costs).
With Pico we’ve hit the ‘pocket money’ price point, yet in RP2040 we’ve managed to pack in enough CPU performance and RAM to run more heavyweight applications such as MicroPython, and AI workloads like TinyML. We’ve also added genuinely new and innovative features such as the Programmable I/O (PIO), which can be programmed to ‘bit-bang’ almost any digital interface without using valuable CPU cycles. Finally, we have released a polished C/C++ SDK, comprehensive documentation and some very cool demos!
For me, this project has been particularly special as I began my career at a small chip-design startup. This was a chance to start from a clean sheet and design silicon the way we wanted to, and to talk about how and why we’ve done it, and how it works.
Pico is also our most vertically integrated product; meaning we control everything from the chip through to finished boards. This ‘full stack’ design approach has allowed optimisation across the different parts, creating a more cost-effective and coherent whole (it’s no wonder we’re not the only fruit company doing this).
And of course, it is designed here in Cambridge, birthplace of so many chip companies and computing pioneers. We’re very pleased to be continuing the Silicon Fen tradition.
You can grab the brand-new issue right now online from the Raspberry Pi Press store, or via our app on Android or iOS. You can also pick it up from supermarkets and newsagents, but make sure you do so safely while following all your local guidelines.
Finally, there’s also a free PDF you can download. Good luck during the #MonthOfMaking, folks! I’ll see y’all online.
The post Raspberry Pi Pico – Vertical innovation appeared first on Raspberry Pi.
Bien que les traqueurs de l'application Android de LastPass ne recueillent aucune donnée personnelle, l'information pourrait ne pas plaire à certains utilisateurs soucieux de leur vie privée.
L'article Traqueurs: Un populaire gestionnaire de mots de passe sous la sellette a d'abord été publié sur WeLiveSecurity
Un aperçu de certaines des moyens par lesquels ESET a un impact sur le bien-être des personnes, des communautés et de l'environnement.
L'article Défendre de justes causes : Découvrez l’implication sociale d’ESET a d'abord été publié sur WeLiveSecurity
Light up your living room like Piccadilly Circus with this Raspberry Pi Pico project from the latest issue of HackSpace magazine. Don’t forget, it’s not too late to get your hands on our new microcontroller for FREE if you subscribe to HackSpace magazine.
HUB75 LED panels provide an affordable way to add graphical output to your projects. They were originally designed for large advertising displays (such as the ones made famous by Piccadilly Circus in London, and Times Square in New York). However, we can use a little chunk of these bright lights in our projects. They’re often given a ‘P’ value, such as P3 or P5 for the number of millimetres between the different RGB LEDs. These don’t affect the working or wiring in any way.
We used a 32×32 Adafruit screen. Other screens of this size may work, or may be wired differently. It should be possible to get screens of different sizes working, but you’ll have to dig through the code a little more to get it running properly.
The protocol for running these displays involves throwing large amounts of data down six different data lines. This lets you light up one portion of the display. You then switch to a different portion of the display and throw the data down the data lines again. When you’re not actively writing to a particular segment of the display, those LEDs are off.
There’s no in-built control over the brightness levels – each LED is either on or off. You can add some control over brightness by flicking pixels on and off for different amounts of time, but you have to manage this yourself. We won’t get into that in this tutorial, but if you’d like to investigate this, take a look at the box on ‘Going Further’.
The first thing you need to do is wire up the screen. There are 16 connectors, and there are three different types of data sent – colour values, address values, and control values. You can wire this up in different ways, but we just used header wires to connect between a cable and a breadboard. See here for details of the connections.
These screens can draw a lot of power, so it’s best not to power them from your Pico’s 5V output. Instead, use a separate 5V supply which can output enough current. A 1A supply should be more than enough for this example. If you’re changing it, start with a small number of pixels lit up and use a multimeter to read the current.
With it wired up, the first thing to do is grab the code and run it. If everything’s working correctly, you should see the word Pico bounce up and down on the screen. It is a little sensitive to the wiring, so if you see some flickering, make sure that the wires are properly seated. You may want to just display the word ‘Pico’. If so, congratulations, you’re finished!
However, let’s take a look at how to customise the display. The first things you’ll need to adapt if you want to display different data are the text functions – there’s one of these for each letter in Pico. For example, the following draws a lower-case ‘i’:
def i_draw(init_x, init_y, r, g, b):
for i in range(4):
light_xy(init_x, init_y+i+2, r, g, b)
light_xy(init_x, init_y, r, g, b)
As you can see, this uses the light_xy method to set a particular pixel a particular colour (r, g, and b can all be 0 or 1). You’ll also need your own draw method. The current one is as follows:
def draw_text():
global text_y
global direction
global writing
global current_rows
global rows
writing = True
text_y = text_y + direction
if text_y > 20: direction = -1
if text_y < 5: direction = 1
rows = [0]*num_rows
#fill with black
for j in range(num_rows):
rows[j] = [0]*blocks_per_row
p_draw(3, text_y-4, 1, 1, 1)
i_draw(9, text_y, 1, 1, 0)
c_draw(11, text_y, 0, 1, 1)
o_draw(16, text_y, 1, 0, 1)
writing = False
This sets the writing global variable to stop it drawing this frame if it’s still being updated, and then just scrolls the text_y variable between 5 and 20 to bounce the text up and down in the middle of the screen.
This method runs on the second core of Pico, so it can still throw out data constantly from the main processing core without it slowing down to draw images.
Each month, HackSpace magazine brings you the best projects, tips, tricks and tutorials from the makersphere. You can get it from the Raspberry Pi Press online store, The Raspberry Pi store in Cambridge, or your local newsagents.
Each issue is free to download from the HackSpace magazine website.
When you subscribe, we’ll send you a Raspberry Pi Pico for FREE.
The post Make an animated sign with Raspberry Pi Pico appeared first on Raspberry Pi.
In our free Coolest Projects online showcase, we invite a worldwide community of young people to come together and celebrate what they’ve built with technology. For this year’s showcase, we’ve already got young tech creators from more than 35 countries registered, including from India, Ireland, UK, USA, Australia, Serbia, Japan, and Syria!
Everyone up to age 18 can register for Coolest Projects to become part of this community with their own tech creation. We welcome all projects, all experience levels, and all kinds of projects, from the very first Scratch animation to a robot with machine learning capacity! The beauty of Coolest Projects is in the diversity of what the young tech creators make.
Young people can register projects in six categories: Hardware, Scratch, Mobile Apps, Websites, Games, and Advanced Programming. Projects need to be fully registered by Monday 3 May 2021, but they don’t need to be finished then — at Coolest Projects we celebrate works in progress just as much as finished creations!
To learn more about the registration process, watch the video below or read our guide on how to register.
Here are the different ways we’re supporting your young people — and you — with project creation!
Download the free Coolest Projects workbook that walks young people through the whole creation process, from finding a topic or problem they want to address, to idea brainstorming, to testing their project:
Explore more than 200 free, step-by-step project guides for learning coding and digital making skills that your young people can use to find help and inspiration! For more ideas on what your young people can make for Coolest Projects, have a look around last year’s online showcase gallery.
This Wednesday 3 March at 19:00 GMT / 14:00 ET, young people can join a special Digital Making at Home live stream about capturing ideas for projects. We’ll share practical tips and inspiration to help them get started with building a Coolest Projects creation:
On Tuesday 23 March, 16:00 GMT / 11:00 ET, young people can join the Coolest Projects team on a live stream to talk to them about all things Coolest Projects and ask all their questions! Subscribe to our YouTube channel and turn on notifications to be reminded about this live stream.
Join our free online workshops where you as an educator or parent can learn how to best support young people to take part:
Getting creative with technology is truly empowering for young people, and anything your young people want to create will be celebrated by us and the whole Coolest Projects community. We’re so excited to see their projects, and we can’t wait to celebrate all together at our big live stream celebration event in June! Don’t let your young people miss their chance to be part of the fun.
The post How your young people can create with tech for Coolest Projects 2021 appeared first on Raspberry Pi.
How can I check if a file does not exist in a Bash script?
The post How to check if file does not exist in Bash appeared first on nixCraft.
Ni la recherche clinique sur le coronavirus ni les données des patients n'ont été affectées par l'incident.
L'article Piratage du laboratoire Covid‑19 de l’université d’Oxford a d'abord été publié sur WeLiveSecurity
All supported versions of FreeBSD are affected by various security bugs that need to be applied ASAP. If the process is privileged, it may escape jail and gain full access to the FreeBSD system. Similarly, when using Xen, a malicious or buggy frontend driver may be able to cause resource leaks. Let us see what and how to fix these security vulnerabilities on FreeBSD.
The post FreeBSD jail, xen, and .pam_login_access security fixes released appeared first on nixCraft.
Pi Day is a special occasion for people all around the world (your preferred date format notwithstanding), and I love seeing all the ways that makers, students, and educators celebrate. This year at the Raspberry Pi Foundation, we’re embracing Pi Day as a time to support young learners and creators in our community. Today, we launch our first Pi Day fundraising campaign. From now until 14 March, I’d like to ask for your help to empower young people worldwide to learn computing and become confident, creative digital makers and engineers.
Millions of learners use the Raspberry Pi Foundation’s online coding projects to develop new skills and get creative with technology. Your donation to the Pi Day campaign will support young people to access these high-quality online resources, which they need more urgently than ever amidst disruptions to schools and coding clubs. Did I mention that our online projects are offered completely free and in dozens of languages? That’s possible thanks to Raspberry Pi customers and donors who power our educational mission.
It’s not only young people who rely on the Raspberry Pi Foundation’s free online coding projects, but also teachers, educators, and volunteers in coding clubs:
“The project resources for Python and Scratch make it really easy for the children to learn programming and create projects successfully, even if they have limited prior experience — they are excellent.”
— Code Club educator in the UK
“The best thing […] is the accessibility to a variety of projects and ease of use for a variety of ages and needs. I love checking the site for what I may have missed and the next project my students can do!”
— Code Club educator in the USA
Your Pi Day gift will make double the impact thanks to our partner EPAM, who is generously matching all donations up to a total of $5000. As a special thanks to each of you who contributes, you’ll have the option to see your name listed in an upcoming issue of The MagPi magazine!
All young people deserve the opportunity to thrive in today’s technology-driven world. As a donor to the Raspberry Pi Foundation, you can make this a reality. Any amount you are able to give to our Pi Day campaign — whether it’s $3.14, $31.42, or even more — makes a difference. You also have the option to sign up as a monthly donor.
Let’s come together to give young people the tools they need to make things, solve problems, and shape their future using technology. Thank you.
PS Thanks again to EPAM for partnering with us to match your gifts up to $5000 until 14 March, and to CanaKit for their generous Pi Day contribution of $3141!
The post Pi Day at the Raspberry Pi Foundation appeared first on Raspberry Pi.
Deux nouveaux outils avertiront les utilisateurs des risques liés à la recherche et au partage de contenus qui exploitent les enfants, y compris les conséquences juridiques potentielles d'une telle pratique.
L'article Facebook intensifie sa lutte contre les contenus pédopornographiques a d'abord été publié sur WeLiveSecurity