I have an idea of building a model traffic lights node with Arduino. One node should serve the whole intersection with all the lights from all directions.
I want to use a 1-wire DS2408 to identify the node by its factory set unique id and have its 8 IOs for different lights.
One node should have more lights (for difficult intersections more than 30-40).
I want to use some LED driver like MAX7219 or shift register like 74HC595 to extend these 8 IOs to 64.
Can something like this be done? Can I use DS2408 (1-Wire 8-Channel Addressable Switch) and extend its IOs?
Or what would you suggest?
I want to use this 1-wire protocol for better scalability and easy node addressing, let's say I want to build a model city with 100 intersections..
Thank you.
Related
First Thanks in advance.
Is there a way for an Arduino board to detect what other boards are attached (such as infrared, or servo motor etc) or simple things such as led or push buttons? Basically is there a way to do Plug N Play?
I would like to design a system using an Arduino were the user can mix and match infrared sensors, motors, led. The script would recognize what is attached to the board and respond accordingly. Currently one is forced to hard code in the script identifying what pin is attached to what. Hence if the user pulls out a servo motor and adds an infrared, then the script must be rewritten. This is what I want to avoid.
Thanks.
You started with
user mix and match sensors, motors, led. The script would recognize
what is attached
and later added
Arduino for model railroads, to dynamically add servos, lights and
sensors
These are not the same, narrowing the scope makes all the difference. See my comment for first option. As for building a specific model that will recognize elements, sure, this can be done in couple of ways depending on the topology you intend to implement and in that case the main concern should be:
How will elements/nodes be connected to each other and / or the main board?
If you intend to run seperate wires for each element you could identify them by dedicating one wire for ID and use a different resistor on each, That's complicated and limited and I wouldn't do that.
On the other end you could create a parallel bus that runs from node to node and can be extended as needed, it will have a small number of wires that will implement I2C for instance, and for identification but also as local drivers you would add an ATtiny on each node.
I have an Analog Four MK1 connected directly to the computer and to the speakers and used as an Audio Interface in Ableton.
I will get now an Elektron Analog Rytm MKII. and I wonder if I can play both or I should add an Audio Interface like Focusrite Scarlett 2i2 (2nd Gen)
When you route the audio already through the computer this should be easy with OB2.
Or when you don’t want to use OB2 yet, you can also connect the main outs of AR to the inputs of the A4 so you can mix it in.
You can route the rytm through the analog four inputs and do it that way. just turn on the volume (FX track + OSC1 /Ext In).
I am trying to start a project in which I would create my own app on iOS using Swift to communicate with an Arduino 101 to control multiple LEDs. I have used this project as a base point.
After getting this to work with my custom app, I wanted to figure out how to make this work with multiple LEDs instead of just one. Currently, I am just performing writeCharacteristic to send a 1 or a 0 to the Arduino depending on which button I press (ON/OFF). However, for the new project, I need to be able to select one of the lights (select one of four output pins), and write a 1 or a 0 to turn it on and off. I didn't know what approach I should take to do this.
I don't need any code, just suggestions on how I can make this work through swift/Arduino code.
Thanks.
It's all explained in the manual.
https://www.arduino.cc/en/Reference/CurieBLE
Service design patterns
A characteristic value can be up to 20 bytes long. This is a key
constraint in designing services. Given this limit, you should
consider how best to store data about your sensors and actuators most
effectively for your application. The simplest design pattern is to
store one sensor or actuator value per characteristic, in ASCII
encoded values.
So either create a separate BLEBoolCharacteristic instance for each LED or combine the switch state of all leds in the same BLECharacteristic. For example you could encode 8 LED states in a single byte (1 LED per bit).
Do whatever you prefer. But read manuals...
I am designing a solution where I can control around 20 meters of multicolour LED Strips in room via a PC/Windows or WEB application probably using Arduino.
The application should give the RGB value All the strips and they will light with the same colour. so the whole 20 meters will light with the same colour
Can you please advice me to the best way to do so using any controller in your mind, I prefer if the controller has an API for .Net apps but I am open to any suggestions.
Do you think that I can control the 20 meters LED strips with only one controller or I might need more than one?
Is there specific LED strips that must be used or any type will work fine for the purpose?
Thanks a lot for any help you would provide.
Because of the length (20m) and the fact that you need to control all strips to the same colour I suggest having a look at either analog or digital RGB LED strips. They don't need to be addressable if you need to use the same colour.
Figure out what constraint you have for the installation site (e.g. indoors/outdoors/proximity to power/light intensity/etc.).
In terms of control, you should be able to use an LED Driver or a DMX Dimmer and Controller.
In terms code, doing a search I spotted QuickDMX which should be able to prepare valid DMX packets for a USB DMX Controller. Regarding LED Controllers, my hunch is each manufacturer will use it's own protocol, but hopefully nothing too complicated a specification and Serial library(e.g. System/IO/Ports/SerialPort).
iBeacon Question. Is this possible ..
Can I have 4 iBeacon’s that are used on the corners of a stage that is say 10ft by 25ft. This is used so I can detect this stage area in the App. (Are 4 iBeacon’s needed to do this or can it be done with 3?)
I Then need the App to detect 2 things ...
The app needs to detect if it’s inside or outside of the area, and how close it is to the area it is outside of, and on what side of the area it is.
If a 5th iBeacon is brought inside the area, can the app detect that there is a separate iBeacon that is within the stage area setup by the previous 4 iBeacon’s.
E.g. You App tells you there is a stage in front and where in relation to the stage you are by using the 4 iBeacon’s. The app then tells you that there is now another 5th iBeacon has entered the stage and where it is on the stage. The App can then detect that the 5th iBeacon has now left the stage.
Is this possible???
Yes you can, as long as each beacon has a unique identifier. Most likely I would configure the beacons to:
Have the same UUID
Have the same Major
Have a unique Minor
If you use CoreLocation's locationManager:didRangeBeacons:inRegion: the delegate will give you a callback with all the beacons it can see at a current time. You can use this to track your own list of beacons and see if a new beacon has appeared.
Example code might look like this:
- (void)locationManager:(CLLocationManager *)manager
didRangeBeacons:(NSArray *)beacons
inRegion:(CLBeaconRegion *)region
{
for (CLBeacon *beacon in beacons)
{
// TODO: Handle each beacon logic here
}
// TODO: Clean up any stale beacons here (e.g. remove old beacons)
}
```
csexton's answer is correct in terms of ranging multiple beacons, but you may have difficulty using multiple beacons to accurately determine a position in a 10'x25' stage.
iBeacon distance calculations are based on received signal strength and is affected considerably by things that absorb the radio signal - such as people. The iPhone doesn't have a directional bluetooth antenna so it can't triangulate the received signals, so this means if the beacon on, say, the left edge of the stage is being received the app won't know whether the device is on the stage, to the right of the iBeacon, or off the stage in the audience.
I guesss all you can do is try.