Notifications
Clear all

Processing and Firmata

42 Posts
5 Users
0 Likes
13.1 K Views
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 

NICE Telescope!  ? 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
 cas
(@cas)
Member
Joined: 5 years ago
Posts: 19
Topic starter  

@robo-pi

Hi,

thanks.

it's nice optically. I'll just work through all the niggles and then get down to some serious imaging.

 

Best

cas


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@robo-pi

What kind of mount is it?

I leave a few hours and you guys start talking scopes!!!

I'll skip the list of scope I have had over the years :/

@cas

That's a nice Exp Sci. That a 102 or 120mm?

I currently have an old AR6 (153mm) I never use, due to it's size setup time and my age. I have a 90mm acro on a LX55 mount. I have 100mm tag along reflector and an ETX 70mm.  I use the two smaller scopes mostly since I live in a city environment. I've been a visual observer since I was in my teens.  I have a couple of cameras but have not really started anything serious yet, just tinkering. I'm planning to do a bit this fall and winter though.

Scott

 


   
ReplyQuote
 cas
(@cas)
Member
Joined: 5 years ago
Posts: 19
Topic starter  

Hi Scott 🙂

it's a 102, dedicated to imaging. I'm hoping to pick up a 127 soon for visual.

The mount is a celestron avx. I can't do with the 127 what I've done to the 102. The weight would be too much - hence visual only with the 127.

The 102 rig with all the gear you see in the pictures weighs 19 pounds. The mount is rated for 30. So going by the rule of thumb, this is (I Think) about as far as I can go weight-wise for imaging. It's a little over 60% of the rated capacity.

Just need to work the bugs out - and away I go 🙂 Definitely be ready for winter which is the best time of year in the UK.

cas


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @triform

What kind of mount is it?

This isn't mine but it looks identical.  I actually had to look up 'Antique Telescope Mounts' to find a picture of this one.  All the newer mounts look more like camera tripods.  I don't know if being an antique makes it worth more, or if it just means that it's long past due to toss it out.   This one said that it was for a 7" to 8" scope.   The one I have was for 10" to 12" scopes.  So mine is most likely a bit heftier than the one shown in this photo.   But the overall design is pretty much identical.

Here's a picture that is probably closer to the size I have.  Although this is only an 8" scope.  Mine was a 10" scope.  But then again, I made the scope myself, so I could be that I was using the 8" mount?  I don't recall the details.

Posted by: @triform

I leave a few hours and you guys start talking scopes!!!

That the price you pay when you leave the DroneBot Worshop Forums.  Can't blink or you miss the good stuff.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
 cas
(@cas)
Member
Joined: 5 years ago
Posts: 19
Topic starter  

@robo-pi

🙂


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@robo-pi

Oh yeah, old big newt mount. I see them at astro swap meets now and then.  It would be great for a visual setup in a shed on rollers. My back hurts just looking at it :/

I have had some large scopes. Had a Coulter 13.1" dob and loved it. Later a 10" Meade and also a 8" Meade SCT. I kept the SCT for a very long time but sold it @ 8 years ago. I miss it. The dobs, I sold one and gave the other away. Needed the room for kids.  I have the AR6 now and used it last for the eclipse, but need to sell or swap soon, as it weighs 23lbs just the OTA. I keep my 90mm on the mount now. 

Scott 


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @triform

My back hurts just looking at it

That what I'm thinking.  I was going to offer to give it to someone who would pay the shipping, but just the shipping costs would probably be more than it's worth.    I never considered it to be a portable scope.  I had it set up in one spot and that where she stayed.  In fact, I actually build a building around it.  A tiny version of an observatory.  It would definitely be best for someone who plans on having a stationary telescope.  That's for sure.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

I have been playing around with firmata/pyfirmata for a couple of days.

Does anybody else think that a pyfirmata module in Python, and on the Arduino, a library and over 800 lines of code is a bit over the top for creating and controlling objects with about four or more methods?

object.write(d:6:o)

object.analog[0].enable_reporting()

object.analog[0].read()

object.exit()

I would definitely like to hear opinions.


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

I did find this website on the internet to kick me off with Firmata.

https://raspberrypi-aa.github.io/session3/firmata.html

Unfortunately, this guy omitted how to set up the Arduino side. Silly me, I thought this was going to work with the Arduino and a blank loop().

Far from it, it took a lot more digging to get one LED to flash with Python.

I haven't found a single resource that covers both RasPi/computer and Arduino setups. Should have looked at youTube I guess.


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 
Posted by: @pugwash

I have been playing around with firmata/pyfirmata for a couple of days.

Does anybody else think that a pyfirmata module in Python, and on the Arduino, a library and over 800 lines of code is a bit over the top for creating and controlling objects with about four or more methods?

object.write(d:6:o)

object.analog[0].enable_reporting()

object.analog[0].read()

object.exit()

I would definitely like to hear opinions.

Most code today is over the top today by that standard.  Most programmers that write code professionally use a lot of lines, memory and other resources.  Some of it is just the nature of the beast, i.e. Web coding, modern UI, etc.  I'm not going to say I agree with it...

I have used firmata, but am not a huge fan of it, but do see it's value.  The project I used it for was an art installation and would be maintained by artist and museum personnel.  Using it allowed for me to have all the code they needed to change on a PC and not the uC. This is what it was really meant for, methinks anyway.  Keeping the untrained away from the hardware.

Now, I agree that firmata is long-winded and could have been done in a quarter of the code (or possibly less).  I did a similar thing a few years back as a weekend hack for the ESP8266.  It was half the size but can't be used for fruit to fruit comparison due to web vs. serial. 

Overall, for all we don't like, others do and it helps some to get their foot in the door with uC use in projects.

Scott

 


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

The first pitfall encountered using pyfirmata.

A simple experiment to switch an LED on when dark and off when light, using a voltage divider of a resistor and LDR, connected to pin A0. And LED connected to pin D6.

This code appears to be correct at first glance but Python throws an error.

#!/usr/bin/python

from pyfirmata import Arduino, util

import time

board = Arduino('/dev/cu.usbmodem1461')

it = util.Iterator(board)

it.start()

board.analog[0].enable_reporting()

led = board.get_pin('d:6:o')

while True:

analog_val = board.analog[0].read()

if analog_val <0.01:

led.write(1)

else:

led.write(0)

time.sleep(1.0)

board.exit()

The problem is that pyfirmata returns a Non-Data Type as the first value, so it is critical to check and skip over this first value.

 

#!/usr/bin/python

from pyfirmata import Arduino, util

import time

board = Arduino('/dev/cu.usbmodem1461')

it = util.Iterator(board)

it.start()

board.analog[0].enable_reporting()

led = board.get_pin('d:6:o')

while True:

analog_val = board.analog[0].read()

if analog_val is not None: # this is the necessary addition

if analog_val <0.01:

led.write(1)

else:

led.write(0)

time.sleep(1.0)

board.exit()

Now the code should start up without throwing an error.

It should also be noted that values returned by pyfirmata from Analog pins are not integers between 0 & 1023, they are actually floating-point numbers between 0.0 & 1.0.


   
ReplyQuote
Page 3 / 3