traffic light - Share Project - PCBWay (2024)

Download Gerbers Download BOM(Bill of materials)

Jan 08,2022

460 views

2 Layers PCB 43.9 x 118.4 mm FR-4, 1.6 mm, 1, HASL with lead, Green Solder Mask, White silkscreen

a basic traffic light timer board that uses 555 timer and a 4017 decade counter to control 12 leds

460

8.25 (1)

Published: Jan 08,2022

Download Gerber file 10

BOM(Bill of materials)

PCBWay Donate 10% cost To Author

Only PCB

PCB+Assembly

Add to cart

*PCBWay community is a shared platform and we are not responsible for any design issues.

Copy this HTML into your page to embed a link to order this shared project

Copy

  • PCB
  • Rigid-Flex
  • Assembly
  • SMD-Stencil
  • CNC
  • Sheet metal
  • 3D Printing
  • Injection Molding

traffic light - Share Project - PCBWay (11)

Toolkit-23 in 1 Precision Screwdriver

BUY NOW

traffic light - Share Project - PCBWay (12)

MHP50-A5 Mini Hot Plate Preheater

BUY NOW

traffic light - Share Project - PCBWay (13)

Logic Analyzer LA104

BUY NOW

traffic light - Share Project - PCBWay (14)

Smart Soldering Iron TS101-BC2

BUY NOW

Topic

DIY Electronics

led traffic light

  • Comments(0)
  • Likes(0)

You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

0 / 10000

    '; html += '

    '; html += '

    '; html += ' '; html += ''; html += '

    '; $('#div-three-' + id).children('div').append(html).show(); } }, //取消添加留言 fn_cancel_msg: function (obj) { $(obj).parents('.js-son-comments').hide(); }, //删除自己的留言 fn_del_msg: function (level, id) { layer.confirm($('#JsA10').val(), function (index) { $.getJSON(commentObj.fn_del_comment_url(), { msgid: id }, function (res) { if (res.result) { if (level == 1) { //if (ispage > 0) // window.location.reload(); $('#li' + id).remove(); commentObj.fn_up_level_msg_cnt(level, id, -1); } else { var obj = $('#' + (level == 1 ? 'li' : 'div-three-') + id); var num = parseInt(obj.parents('li').find('b').text()); num += -1; if (num < 0) { num = 0; } var parobj = $('#div-three-' + id).parent(); obj.parents('li').find('b').text(num); $('#div-three-' + id).remove(); if (parobj.find('.sub-comment').length > 0) { } else { parobj.parent().hide(); } } commentObj.fn_up_msg_cnt(-1); layer.close(index); } else if (res.msg == "nothing") { layer.alert("error"); return; } else if (res.msg == "havereply") { layer.alert($('#JsA11').val()); return; } else { layer.alert($('#JsA12').val()); return; } }); }) }, //更新留言数量 fn_up_msg_cnt: function (val) { var num = parseInt($('#MsgCount').text()); num += parseInt(val); if (num < 0) { num = 0; } $('#MsgCount').text(num); }, //更新留言数量level fn_up_level_msg_cnt: function (level, id, val) { var obj = $('#' + (level == 1 ? 'li' : 'div-three-') + id); var num = parseInt(obj.parents('li').find('b').text()); num += parseInt(val); if (num < 0) { num = 0; } obj.parents('li').find('b').text(num); }, fn_mark_comment: function (obj, islike, commentid) { if (logintype != 1) { layerLogin(); return; } $.getJSON($('#memberurl').val() + '/Project/CommentMark?callback=?', { id: commentObj.obj_id, ProjectType: commentObj.obj_type, isLike: islike, commentid: commentid }, function (res) { if (res.result) { var markCnt = parseInt($('#commentMarkCnt' + commentid).text()); if ($(obj).hasClass('active')) { $(obj).removeClass('active'); if (islike) { $('#commentMarkCnt' + commentid).text(markCnt - 1); } else { $('#commentMarkCnt' + commentid).text(markCnt + 1); } } else { if ($(obj).parent().find('dl').hasClass('active')) { if (islike) { $('#commentMarkCnt' + commentid).text(markCnt + 2); } else { $('#commentMarkCnt' + commentid).text(markCnt - 2); } $(obj).parent().find('dl').removeClass('active'); } else { if (islike) { $('#commentMarkCnt' + commentid).text(markCnt + 1); } else { $('#commentMarkCnt' + commentid).text(markCnt - 1); } } $(obj).addClass('active'); } } else if (res.msg == "nologin") { //弹出登录框 layerLogin(); } else layer.alert("error"); }); }, //加载数据 fn_load_data: function (page) { $('#commentload').show(); $.ajax({ url: commentObj.fn_get_comment_url(), dataType: 'jsonp', data: { objid: commentObj.obj_id, objtype: commentObj.obj_type, page: page }, success: function (jason) { var totalpage = jason.TotalCount / 20; if (totalpage % 1 > 0) totalpage = parseInt(totalpage) + 1; if (page >= totalpage) { $('#commentviewmore').parent().remove(); } else { $('#commentviewmore').parent().show(); } if (jason.TotalCount > 0) { page = jason.PageIndex; var msgList = jason.DataList; var html = ''; if (msgList && msgList.length > 0) { for (var item in msgList) { html += '

  • '; if (commentObj.is_project == 1 && commentObj.obj_type == 6) { html += '

    '; html += '

    '; html += '
    '; html += '
    ' + msgList[item].MarkCnt + '
    '; html += '

    '; html += '

    '; html += '
    '; html += '
    '; html += '

    ' + (msgList[item].MbId > 0 ? msgList[item].ContactName : msgList[item].Name == "" ? msgList[item].Email : msgList[item].Name) + '

    '; } else { html += ''; html += '' html += ''; html += ''; html += '' html += '

    ' + (msgList[item].MbId > 0 ? msgList[item].ContactName : msgList[item].Name == "" ? msgList[item].Email : msgList[item].Name) + '

    '; } html += '

    '; if (msgList[item].MsgPic && msgList[item].MsgPic != '') { html += '

    ' html += '

    ' html += "traffic light - Share Project - PCBWay (18)"; html += '

    '; html += '

    '; } html += msgList[item].Note; html += '

    '; // html += ''; html += '

    '; html += '' + msgList[item].EnAddTime + ''; html += '' + (msgList[item].ReplyList ? msgList[item].ReplyList.length : 0) + ' ' + $('#JsA1').val() + ''; html += '

    '; // html += '

    '; html += '

    '; var ReplyList = msgList[item].ReplyList; if (ReplyList && ReplyList.length > 0) { for (var reply in ReplyList) { html += '

    '; html += '

    '; html += '

    '; html += '' + ReplyList[reply].ContactName + ' '; html += '' + ReplyList[reply].AddTimeStr + ''; html += ''; html += '' + $('#JsA13').val() + ''; if (ReplyList[reply].IsMy && ((new Date() - new Date(ReplyList[reply].AddTime)) / (1000 * 60 * 60)) <= 5 && (!ReplyList[reply].ReplyList || ReplyList[reply].ReplyList.length == 0)) { html += ' ' + $('#JsA14').val() + ''; } html += ''; html += '

    '; html += '

    '; if (ReplyList[reply].ReplyCommentId > 0 && ReplyList[reply].ReplyCommentId != msgList[item].Id) { html += '

    '; html += $('#JsA13').val() + '@ ' + ReplyList[reply].ReplyContactName + ':'; html += '

    '; } html += '

    ' + ReplyList[reply].Note + '

    '; html += '

    '; html += '

    '; html += '

    '; } } html += '

    '; if (msgList[item].ReplyList && msgList[item].ReplyList.length > 0) { html += '

    '; } html += '

    '; html += '

    '; if (msgList[item].MbId > 0) { html += '' + $('#JsA13').val() + ''; } //

    if (msgList[item].IsMy && ((new Date() - new Date(msgList[item].AddTime)) / (1000 * 60 * 60)) <= 5 && (!msgList[item].ReplyList || msgList[item].ReplyList.Count == 0)) { html += ' ' + $('#JsA14').val() + ''; } html += '

    '; html += '
  • '; } $('#commentload').hide(); $('#comment_ul').append(html); } } $('#commentload').hide(); }, error: function (xhr, status, error) { $('#commentload').hide(); } }); }, //保存数据 fn_save_msg: function (level, id) { var msg = $('#msg-' + id).val(); var msgpic = ''; if (level == 1) { msgpic = $('#msgPic').val(); } if (msg && msg.length > 10000) { $('#msg-' + id).addClass('form-error'); return false; } if ((msg && msg.length > 0) || msgpic.length > 4) { $('body').addClass('global-loading'); $.ajax({ url: commentObj.fn_save_comment_url(), //dataType: 'jsonp', type: 'POST', data: { msg: msg, replyid: id, objid: commentObj.obj_id, msgpic: msgpic, objtype: commentObj.obj_type, isproject: commentObj.is_project }, crossDomain: true, xhrFields: { withCredentials: true }, success: function (res) { if (res.result) { //if (ispage > 0) { // window.location.reload(); // return; //} //js加载,不刷新页面,增强体验 $('#msg-' + id).val(""); if (level == 1) { $('.js-add-comment .js-words').css({ 'color': '#999' }).text(0); } else { $('#msg-' + id).next().find('.js-words').css({ 'color': '#999' }).text(0); } if (level == 1) { $('#msgPic').val(''); $('#msgPic').parent().find('img').remove(); $('#removeMsgPic').hide(); //第一级留言(直接回复文章) var objtype = parseInt($('#hidobjtype').val()); var html = '

  • '; if (commentObj.is_project == 1 && commentObj.obj_type == 6) { html += '

    '; html += '

    '; html += '
    '; html += '
    0
    '; html += '

    '; html += '

    '; html += '
    '; html += '
    '; html += '

    ' + commentObj.fn_get_username(res.msg.ContactName) + '

    '; } else { html += ''; html += '

    ' + commentObj.fn_get_username(res.msg.ContactName) + '

    '; } html += '

    '; if (res.msg.MsgPic && res.msg.MsgPic != '') { html += '

    ' html += '

    ' html += "traffic light - Share Project - PCBWay (21)"; html += '

    '; html += '

    '; } html += res.msg.Note; html += '

    '; // html += ''; html += '

    '; html += '' + res.msg.EnAddTime + ''; html += ' 0 ' + $('#JsA1').val() + ''; html += '

    '; html += ''; html += '

    '; html += '' + $('#JsA13').val() + ' '; html += '' + $('#JsA14').val() + ''; html += '

    '; html += '
  • '; $('#comment_ul').prepend(html); commentObj.fn_up_msg_cnt(1); //commentObj.fn_up_level_msg_cnt(1, res.msg.Id, 1); //if (ispage == 0) // $("html,body").animate({ scrollTop: $("#li" + res.msg.Id).offset().top - 70 }, 1000); } else { //第二级留言(回复第一级留言) var html = '

    '; html += '

    '; html += '

    '; html += '' + commentObj.fn_get_username(res.msg.ContactName); html += ''; html += ' ' + res.msg.AddTimeStr; html += ''; html += ''; html += '' + $('#JsA13').val() + ' '; html += '' + $('#JsA14').val() + ''; html += ''; html += '

    '; html += '

    '; if (level == 3) { //第三级留言(回复第二级留言) html += '

    '; html += $('#JsA13').val() + '@ ' + commentObj.fn_get_username(res.msg.ReplyContactName) + ':'; html += '

    '; } html += '

    ' + res.msg.Note + '

    '; html += '

    '; html += '

    '; html += '

    '; if (level == 3) { //第三级留言(回复第二级留言) commentObj.fn_add_reply(3, id); $('#div-three-' + id).parent('div').append(html); } else { commentObj.fn_add_reply(2, id); $('#div-two-' + id).show().children('div').append(html); } commentObj.fn_up_msg_cnt(1); commentObj.fn_up_level_msg_cnt(level, res.msg.Id, 1); } } else if (res.msg == "nologin") { //弹出登录框 layerLogin(); } else { layer.alert("error"); } $('body').removeClass('global-loading'); }, error: function (xhr, status, error) { $('body').removeClass('global-loading'); } }); } else { $('#msg-' + id).addClass('form-error'); if (!$('#msg-' + id).hasClass('js-mention')) $('.error-tips').show().Shake(4, 10); return false; } }, //上传文件 fn_uploader: function () { /*上传文件开始*/ var uploader = WebUploader.create({ // 选完文件后,是否自动上传。 auto: true, // swf文件路径 swf: '/img/js/jqueryplus/webuploader-0.1.5/Uploader.swf', // 文件接收服务端。 server: '/Common/UpFile', // 选择文件的按钮。可选。 // 内部根据当前运行是创建,可能是input元素,也可能是flash. pick: { id: '#msgFile', multiple: false }, fileVal: 'FileData', //fileNumLimit: 1, fileSingleSizeLimit: '5242880',//'10485760', accept: { title: 'File', extensions: 'bmp,png,gif,jpg,jpeg', mimeTypes: 'image/*' }, 'formData': { 'uptype': "blogfile", 'key': "", 'checkcode': "", "getjson": true }, }); uploader.on('uploadStart', function (file, percentage) { if (logintype != 1) { layerLogin(); return; } $('#sfile').before('traffic light - Share Project - PCBWay (22)'); $('#sfile').html('Uploading(0%)'); }); uploader.on('uploadProgress', function (file, percentage) { $('#sfile').html('Uploading(' + parseInt(percentage * 100) + '%)'); }); uploader.on('uploadSuccess', function (file, data) { $('#sfile').html(''); $('#msgPic').parent().find('img').remove(); $('#msgPic').before('

    traffic light - Share Project - PCBWay (23)

    '); $('#msgPic').val(data.url); $('#msgPic').next().show(); $('.error-tips').hide(); }); uploader.on('error', function (str) { if (str == "F_EXCEED_SIZE") { alert($('#JsA9').val()) } }); $('#removeMsgPic').click(function () { $('#msgPic').val(''); $('#msgPic').parent().find('img').remove(); $(this).hide(); uploader.reset(); }); /*上传文件结束*/ } } commentObj.fn_init();

    traffic light - Share Project - PCBWay (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Maia Crooks Jr

    Last Updated:

    Views: 6295

    Rating: 4.2 / 5 (63 voted)

    Reviews: 86% of readers found this page helpful

    Author information

    Name: Maia Crooks Jr

    Birthday: 1997-09-21

    Address: 93119 Joseph Street, Peggyfurt, NC 11582

    Phone: +2983088926881

    Job: Principal Design Liaison

    Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

    Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.