Tag Archives: Raspberry

Five Things You Need to Know About the Raspberry Pi Zero

created by spannerspencer on Nov 25, 2015 2:02 PM, last modified by spannerspencer on Nov 26, 2015 7:38 AM

It’s always exciting with the Raspberry Pi Foundation launches a new board, and we know that you’re bursting with questions about the all-new Pi Zero. We certainly were.

 

So here are our top five questions about the Pi Zero that we’re anticipating you’ll have, along with their answers, of course.

 

1) What are the technical specifications of the Raspberry Pi Zero?

    • CPU: Broadcom BCM2835, can be overclocked up to 1GHz.
    • RAM: 512MB on board.
    • Power: 5V, supplied via micro USB connector, drawing160mA (even when connected to an HD display).
    • Dimensions: 65mm x 30mm x 5mm
    • Storage: MicroSD card.
    • Video & Audio: 1080P HD video output. Audio output via mini-HDMI connector.
    • Operating System: Linux, installed via NOOBS.
    • Click here for an exploded image of the Pi Zero’s features.

 

 

2) Where can I buy a Raspberry Pi Zero?

    • The new Raspberry Pi Zero is available to order from Thursday, 26th November. Initial stocks are extremely limited, with small pockets of availability in the US and UK. Unless you’re one of the lucky few to get your hands on one of the first batch, the next deliveries are due towards the end of December.
    • You’ll be able to order the new Pi Zero in the majority of countries as more stock becomes available.
    • Click the Buy Now buttons here to check for availability.

 

3) Does it still run Linux?

    • Yes, it does indeed. You install it the same way as always:
      • Download NOOBS and unzip it to a microSD card; connect the Pi Zero to a monitor, USB hub, keyboard and mouse; power it up and follow the on-screen prompts to install the Linux build of your choice.
      • element14 is offering a Pi Zero package that includes a NOOBS microSD card to make your installation quicker and easier.

 

4) What’s the difference between the Raspberry Pi 2 Model B and the new Pi Zero?

    • The Pi Zero uses the single-core BCM2835 processor with 512MB RAM as used in the Raspberry Pi 1 series, versus the newer, faster BCM2836 quad-core processor on the latest high performance Raspberry Pi 2.
    • To save space the following products have been replaced with alternative solutions or removed completely:
      • 4 USB ports and Ethernet port have been replaced with one Micro USB data port on the Pi Zero.
      • 40 pin GPIO still contains the same pin out on both boards, but the connector remains unpopulated on the Pi Zero.
      • The full size HDMI port on the Raspberry Pi 2 has now been replaced with a Mini HDMI port on the Pi Zero. This requires an adapter to be fitted before connecting the Pi Zero to your TV. The Pi Zero still supports full HD 1080P output.
      • The camera and display interfaces have been removed as well as the 4-pole stereo and composite video port.

 

5) Why did the Raspberry Pi Foundation create the Pi Zero?

    • The Pi Zero follows the same philosophy that gave birth to the Raspberry Pi platform in the first place; low cost computing for everyone. The Pi Zero complements the other models in the Raspberry Pi family by providing an entry-level model with stripped down components to target users with specific solutions in mind.
    • Is it the same as the other Raspberry Pis? Yes and no. It’s still a fully functioning Linux-based computer with 1080P video output, but it’s also much more closely related to the small, efficient, single-purpose world of IoT.

 

Got any other questions or observations about the Raspberry Pi Zero? Ask them in the comments below.

Sumber: https://www.element14.com/community/docs/DOC-79280?CMP=SOM-GOOGLEPLUS-PRG-RASPI-PIZERO-BLOG-SSPENCER-5THINGS

Raspberry remote control with Telegram

Telegram is a very versatile instant messaging software that can be used with the same phone number on different devices simultaneously.
In this tutorial we saw how to install it, and we tried to send text and media messages.
We have also seen that it is possible to set the Raspberry to send messages automatically.
In this tutorial we will ask Raspberry to take a specific action as a function of the received message, for example, we could send a text message with the word “photo” and Raspberry will sends us a photo of the apartment, or “lamp” to turn a lamp, or “open” to open the garage door.
Well, let’s start

You need:

a Raspberry Pi B or B+, with the latest version of Raspbian, or our MIcroSD Card 8GB Class 10 Raspbian preinstalled.

Step 1: Installation

Installation:

Read this tutorial, we use this configuration as start point.

To intercept a new incoming message we create a file action.lua

“Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.” From https://www.lua.org.

sudo nano /home/pi/tg/action.lua

with this content

function on_msg_receive (msg)
      if msg.out then
          return
      end
      if (msg.text=='ping') then
         send_msg (msg.from.print_name, 'pong', ok_cb, false)
      end
  end
   
  function on_our_id (id)
  end
   
  function on_secret_chat_created (peer)
  end
   
  function on_user_update (user)
  end
   
  function on_chat_update (user)
  end
   
  function on_get_difference_end ()
  end
   
  function on_binlog_replay_end ()
  end

Save and exit, when incoming text message is “ping”, Telegram answers us with a text message containing “pong”.

move in tg

cd /home/pi/tg

then type

bin/telegram-cli -k tg-server.pub -W -s action.lua

Try to send a message, if all goes well, Telegram answers only on “ping” and not “PING”, we should see something like this

Raspberry Telegram onreceive

 

Raspberry Telegram onreceive

Ok, let’s do something more interesting.

Install the Raspberry Camera, see this tutorial, then create a new folder where we will save the captured photos.

sudo mkdir /home/pi/camera

create a new file camera.sh

sudo nano /home/pi/camera/camera.sh

with this content

#!/bin/bash  
   
  raspistill -w 800 -h 600 -o /home/pi/camera/photo.jpg

save and exit, give it execution permissions

sudo chmod -R 0655 /home/pi/camera/camera.sh

Edit action.lua

sudo nano /home/pi/tg/action.lua

add this lines in function on_msg_receive

if (msg.text=='photo') then
     os.execute('/home/pi/camera/camera.sh')
     send_photo (msg.from.print_name, '/home/pi/camera/photo.jpg', ok_cb, false)
  end

Raspberry Telegram action.lua

Step 2: Test

Test it

bin/telegram-cli -k tg-server.pub -W -s action.lua

Now if you send a text message with “photo”, Raspberry answer with a photo

Raspberry telegram send photo

Raspberry photo with Telegram

To enter additional commands simply change the file action.lua inserting a new if block , for example, we could activate a relay or ask the status of a sensor.

In the next tutorials will achieve some other example of use.

Follow us on social to stay informed.

www.emmeshop.eu