From 2291ab3edb9ce419d438bd34b47880e61028a7d2 Mon Sep 17 00:00:00 2001 From: manojgudi Date: Sun, 16 Mar 2014 02:06:37 +0530 Subject: added demos and some quick fixes --- README.md | 4 +- demos/ramp.grc | 178 ++++++++++++++++++++++++++ demos/sbhs.grc | 375 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ demos/scigen.grc | 199 +++++++++++++++++++++++++++++ demos/serial.grc | 219 ++++++++++++++++++++++++++++++++ demos/sum.grc | 313 ++++++++++++++++++++++++++++++++++++++++++++++ getting_it.md | 12 ++ using_it.md | 5 + 8 files changed, 1303 insertions(+), 2 deletions(-) create mode 100644 demos/ramp.grc create mode 100644 demos/sbhs.grc create mode 100644 demos/scigen.grc create mode 100644 demos/serial.grc create mode 100644 demos/sum.grc diff --git a/README.md b/README.md index 1a03750..868864e 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Sandhi is a free and open-source visual programming language and editor to repla - [Get Binary](getting_it.md#get-binary) ## [Using it](using_it.md) -- Hello World -- Demos +- [Simple Addition](using_it.md#simple-addition) +- [Demos](demos) ## [Code Development](code_devel.md) - [Disruptive introduction to framework](code_devel.md#disruptive-introduction-to-framework) diff --git a/demos/ramp.grc b/demos/ramp.grc new file mode 100644 index 0000000..329cf9b --- /dev/null +++ b/demos/ramp.grc @@ -0,0 +1,178 @@ + + + Fri Mar 7 12:31:38 2014 + + options + + id + top_block + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + max_nouts + 0 + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 32000 + + + _coordinate + (10, 170) + + + _rotation + 0 + + + + plot_sink + + id + plot_sink_0 + + + _enabled + True + + + type + float + + + title + Scope Plot + + + decim + 1 + + + vlen + 1 + + + grid_pos + + + + notebook + + + + _coordinate + (619, 114) + + + _rotation + 0 + + + + ramp + + id + ramp_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 1 + + + vlen + 1 + + + S + 1 + + + H_Off + 0 + + + W_Off + 0 + + + _coordinate + (374, 68) + + + _rotation + 0 + + + + ramp_0 + plot_sink_0 + 0 + 0 + + diff --git a/demos/sbhs.grc b/demos/sbhs.grc new file mode 100644 index 0000000..e04c3c6 --- /dev/null +++ b/demos/sbhs.grc @@ -0,0 +1,375 @@ + + + Fri Mar 7 12:32:59 2014 + + options + + id + top_block + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + max_nouts + 0 + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + gr_vector_source_x + + id + gr_vector_source_x_0_0 + + + _enabled + True + + + type + float + + + vector + 40 + + + repeat + True + + + vlen + 1 + + + _coordinate + (691, 247) + + + _rotation + 0 + + + + const_source_x + + id + const_source_x_0 + + + _enabled + True + + + type + float + + + const + setpoint + + + _coordinate + (31, 100) + + + _rotation + 0 + + + + variable + + id + setpoint + + + _enabled + True + + + value + 37 + + + _coordinate + (276, 46) + + + _rotation + 0 + + + + plot_sink + + id + plot_sink_0 + + + _enabled + True + + + type + float + + + title + Scope Plot + + + decim + 1 + + + vlen + 1 + + + grid_pos + + + + notebook + + + + _coordinate + (940, 85) + + + _rotation + 0 + + + + gr_sbhs + + id + gr_sbhs_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 2 + + + vlen + 1 + + + window + 1 + + + _coordinate + (783, 63) + + + _rotation + 0 + + + + sbhs_controller + + id + sbhs_controller_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 1 + + + vlen + 1 + + + a + 1 + + + P + 2 + + + I + 1 + + + d + 1 + + + b + setpoint + + + window + 1 + + + _coordinate + (498, 18) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 32000 + + + _coordinate + (10, 170) + + + _rotation + 0 + + + + grex_subtract + + id + grex_subtract_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 2 + + + vlen + 1 + + + preload + 1 + + + _coordinate + (332, 205) + + + _rotation + 0 + + + + sbhs_controller_0 + gr_sbhs_0 + 0 + 0 + + + gr_vector_source_x_0_0 + gr_sbhs_0 + 0 + 1 + + + grex_subtract_0 + sbhs_controller_0 + 0 + 0 + + + gr_sbhs_0 + grex_subtract_0 + 0 + 1 + + + const_source_x_0 + grex_subtract_0 + 0 + 0 + + + gr_sbhs_0 + plot_sink_0 + 0 + 0 + + diff --git a/demos/scigen.grc b/demos/scigen.grc new file mode 100644 index 0000000..74e70b9 --- /dev/null +++ b/demos/scigen.grc @@ -0,0 +1,199 @@ + + + Fri Mar 7 12:36:15 2014 + + options + + id + top_block + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + max_nouts + 0 + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 32000 + + + _coordinate + (10, 170) + + + _rotation + 0 + + + + gr_vector_source_x + + id + gr_vector_source_x_0 + + + _enabled + True + + + type + float + + + vector + 1,2,3,4,5,6 + + + repeat + False + + + vlen + 1 + + + _coordinate + (280, 132) + + + _rotation + 0 + + + + scigen_generic + + id + scigen_generic_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 1 + + + vlen + 1 + + + window + 1 + + + func_name + "sin" + + + _coordinate + (500, 70) + + + _rotation + 0 + + + + gr_vector_sink_x + + id + gr_vector_sink_x_0 + + + _enabled + True + + + type + float + + + vlen + 1 + + + _coordinate + (802, 153) + + + _rotation + 0 + + + + gr_vector_source_x_0 + scigen_generic_0 + 0 + 0 + + + scigen_generic_0 + gr_vector_sink_x_0 + 0 + 0 + + diff --git a/demos/serial.grc b/demos/serial.grc new file mode 100644 index 0000000..7b1984f --- /dev/null +++ b/demos/serial.grc @@ -0,0 +1,219 @@ + + + Fri Feb 7 16:19:10 2014 + + options + + id + top_block + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + max_nouts + 0 + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 32000 + + + _coordinate + (10, 170) + + + _rotation + 0 + + + + plot_sink + + id + plot_sink_0 + + + _enabled + True + + + type + float + + + title + Scope Plot + + + decim + 1 + + + vlen + 1 + + + grid_pos + + + + notebook + + + + _coordinate + (803, 92) + + + _rotation + 0 + + + + gr_vector_sink_x + + id + gr_vector_sink_x_0 + + + _enabled + True + + + type + float + + + vlen + 1 + + + _coordinate + (752, 188) + + + _rotation + 0 + + + + gr_serial + + id + gr_serial_0 + + + _enabled + True + + + type + f32_f32 + + + num_inputs + 1 + + + vlen + 1 + + + port + /dev/ttyACM0 + + + baud + 9600 + + + bytesize + 8 + + + parity + N + + + stopbits + 1 + + + _coordinate + (353, 108) + + + _rotation + 0 + + + + gr_serial_0 + plot_sink_0 + 0 + 0 + + + gr_serial_0 + gr_vector_sink_x_0 + 0 + 0 + + diff --git a/demos/sum.grc b/demos/sum.grc new file mode 100644 index 0000000..ed09f3d --- /dev/null +++ b/demos/sum.grc @@ -0,0 +1,313 @@ + + + Sun Mar 16 01:43:44 2014 + + options + + id + top_block + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + max_nouts + 0 + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + 32000 + + + _coordinate + (10, 170) + + + _rotation + 0 + + + + const_source_x + + id + const_source_x_0 + + + _enabled + True + + + type + complex + + + const + 5 + + + _coordinate + (342, 83) + + + _rotation + 0 + + + + const_source_x + + id + const_source_x_0_0 + + + _enabled + True + + + type + complex + + + const + 3 + + + _coordinate + (350, 164) + + + _rotation + 0 + + + + blocks_add_xx + + id + blocks_add_xx_0 + + + _enabled + True + + + type + complex + + + num_inputs + 2 + + + vlen + 1 + + + _coordinate + (571, 89) + + + _rotation + 0 + + + + wxgui_numbersink2 + + id + wxgui_numbersink2_0 + + + _enabled + True + + + type + complex + + + title + Number Plot + + + units + Units + + + samp_rate + samp_rate + + + min_value + -100 + + + max_value + 100 + + + factor + 1.0 + + + decimal_places + 10 + + + ref_level + 0 + + + number_rate + 15 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + show_gauge + True + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (873, 68) + + + _rotation + 0 + + + + blocks_throttle + + id + blocks_throttle_0 + + + _enabled + True + + + type + complex + + + samples_per_second + samp_rate + + + vlen + 1 + + + _coordinate + (700, 134) + + + _rotation + 0 + + + + const_source_x_0 + blocks_add_xx_0 + 0 + 0 + + + const_source_x_0_0 + blocks_add_xx_0 + 0 + 1 + + + blocks_add_xx_0 + blocks_throttle_0 + 0 + 0 + + + blocks_throttle_0 + wxgui_numbersink2_0 + 0 + 0 + + diff --git a/getting_it.md b/getting_it.md index ced528b..4b2d8a8 100644 --- a/getting_it.md +++ b/getting_it.md @@ -88,5 +88,17 @@ and then proceed as given in __Build it__ section from _make_ command. `fpm -s dir -t deb -n "sandhi" -v 0.9 -C out/ -p sandhi-VERSION_ARCH.deb -d "git-core autoconf automake make libtool g++ python-dev swig pkg-config libboost1.48-all-dev libfftw3-dev libcppunit-dev libgsl0-dev libusb-dev sdcc libsdl1.2-dev python-wxgtk2.8 python-numpy python-cheetah python-lxml doxygen python-qt4 python-qwt5-qt4 libxi-dev libqt4-opengl-dev libqwt5-qt4-dev libfontconfig1-dev libxrender-dev" /usr/local/bin /usr/local/include/ /usr/local/lib /usr/local/libexec/ /usr/local/share/ /usr/local/etc/` +#### Final steps +- To run sandhi, path variables need to be set; even if one has installed through debian package. +- Set Path variables in /etc/environment +`export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games`
+`export SCI=/usr/share/scilab`
+`export LD_LIBRARY_PATH=:/usr/lib/scilab:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/native_threads/:/usr/local/lib`
+`export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/`
+ +- Source /etc/environment in .bashrc
+`source /etc/environment`
+- Logout and login again, and you are done! + ------------ diff --git a/using_it.md b/using_it.md index 01f1257..85c69a9 100644 --- a/using_it.md +++ b/using_it.md @@ -1 +1,6 @@ ## Using it + +### Simple Addition +1. Assuming Sandhi is correctly installed, open terminal and enter _sandhi_. +2. Open [Simple Addition](demos/sum.grc) +3. To execute, click on "Execute the flowgraph button" on top center. -- cgit